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
ブログ(articles)が公開されたら、管理者、メンター、現役一般受講生、現役研修生に通知する #7615
Conversation
d23619d
to
9eb1e36
Compare
ea10f83
to
28ecdd0
Compare
28ecdd0
to
ff33b8f
Compare
お疲れ様です🙏 急ぎではありませんので、無理ないタイミングで全く問題ありません!(1~2週間後とかでもOKです) ご検討のほど、よろしくお願いいたします🙇♂️ |
お忙しい中すいません🙏こちらいかがでしょうか? |
@hirano-vm4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
お疲れ様です!確認できました(*'▽')
特に問題ないと思いましたので、わたしからはApproveとさせていただきます。
確認方法や参考資料をわかりやすくまとめてくださっていて、大変ありがたかったです!
お忙しん中、確認いただきありがとうございました🙏引き続きよろしくお願いします! こちらチームメンバーによるレビューが終わりました!お忙しいところ、恐れ入りますがレビューをお願いいたします🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
確認させていただきました。OKです~👌
@@ -0,0 +1,8 @@ | |||
# frozen_string_literal: true | |||
|
|||
class ArticleNotificationDestroyer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
この処理をクラスにしたのいいですね!(名前も)
@@ -170,4 +170,12 @@ def no_correct_answer | |||
|
|||
ActivityMailer.with(question:, receiver:).no_correct_answer | |||
end | |||
|
|||
def create_article |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mailのpreviewもしっかり追加しているのナイスです~
Issue
概要
ブログ(articles)が公開された際、管理者、メンター、現役一般受講生、現役研修生にメール・サイト内通知が飛ぶ機能を実装するRPです。
変更確認方法
feature/article-publication-notifications
をローカルに取り込むbin/setup
を実行foreman start -f Procfile.dev
でサーバーを立ち上げるkomagata
アカウントでログインし http://localhost:3000/articles/new にアクセステスト
等入力し、ページ下部にある「公開する」を押して保存が完了するまで待つkomagata
アカウントのまま、投稿者には通知がされないことをサイト内通知で確認(ページ右上の通知ボタンを押して未読部分を確認してください)machida(管理者)
mentormentaro(メンター)
kensyu(研修生)
kimura(受講生)
でそれぞれログインしてサイト内通知がきていること・通知からブログ詳細に飛べることを確認komagata
アカウントでログインし、 http://localhost:3000/articles のブログ一覧に行って今回投稿したブログの詳細に入り、ページ下部にある「削除」を押して消すmachida(管理者)
mentormentaro(メンター)
kensyu(研修生)
kimura(受講生)
いずれかでログインして通知を開き、サイト内通知が削除されていることを確認レビュー参考資料
通知のトリガーからの流れを把握しやすくなるように図を作成したので参考資料として添付します。
active_delivery
active_delivery
active_deliveryで通知をまとめる - komagataのブログ
Newspaper
komagata/newspaper: Provides a pub/sub mechanism for ruby.
newspaperでActiveRecordのCallbacksを置き換える - komagataのブログ
Newspaperを読んでみた
Railsのメール機能
Action Mailer の基礎 - Railsガイド
Screenshot
変更前
新機能のためなし
変更後
ブログ(article)の投稿
ページ下部の「公開する」を押して保存
通知を確認
rails/mailers/activity_mailer/create_article のプレビュー
/letter_opene