New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

同じテンプレートからユーザごとにポストを作る #31

Merged
merged 4 commits into from Nov 27, 2017

Conversation

Projects
None yet
4 participants
@Pegasus204
Contributor

Pegasus204 commented Nov 27, 2017

目的

  • テンプレートの%{me}を特定のユーザ名で置き換えることができないため、ユーザごとにテンプレートを作る必要があったため

💪 方針

  • 1つテンプレートにme_から始まるタグを付与してユーザごとにポストを作成できるようにした

テスト

  • me_から始まるタグが複数ある場合にユーザごとに記事が作成されることを確認した

@Pegasus204 Pegasus204 self-assigned this Nov 27, 2017

@Pegasus204 Pegasus204 added the WIP label Nov 27, 2017

@sfbot sfbot added the LGTM:1 label Nov 27, 2017

@Pegasus204 Pegasus204 added REVIEW and removed WIP labels Nov 27, 2017

@Pegasus204 Pegasus204 merged commit eac328e into master Nov 27, 2017

2 checks passed

ci/circleci Your tests passed on CircleCI!
Details
ci/sideci No issues found!
Details

@Pegasus204 Pegasus204 deleted the create_post_each_user branch Nov 27, 2017

@Pegasus204

This comment has been minimized.

Show comment
Hide comment
esa_port.update_post(post, feed_user)
{ template.number => post.number }
end
end.flatten

This comment has been minimized.

@eitoball

eitoball Nov 27, 2017

Member

See Enumerable#flat_map

@eitoball

eitoball Nov 27, 2017

Member

See Enumerable#flat_map

This comment has been minimized.

@kokuyouwind

kokuyouwind Nov 29, 2017

Collaborator

あー、そういやflat_mapあるのか

@kokuyouwind

kokuyouwind Nov 29, 2017

Collaborator

あー、そういやflat_mapあるのか

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment