Closed ryohakjae114 closed 3 weeks ago
コメントにIDを追加し、通知メールで特定のコメントへリンクする機能が追加されました。また、テスト環境の設定変更や、投稿主への通知メールのテストも見直されました。
ファイル | 変更内容 |
---|---|
app/views/shared/_comment.html.haml |
.card.comment エレメントにid 属性を追加 |
app/views/user_mailer/commented.html.haml app/views/user_mailer/commented.text.haml |
post_url メソッドにアンカーとして@comment.id を追加 |
config/brakeman.ignore |
"Unscoped Find" 警告の無視設定を追加 |
config/environments/test.rb |
config.action_mailer.default_url_options を{ host: 'miniblog.test:3000' } で設定 |
spec/system/posts/posts_comments_spec.rb |
投稿とコメントのテストユーザ設定を変更し、コメント通知メールの送信機能を含むテストケースを追加。 |
sequenceDiagram
participant User as ユーザ
participant App as アプリ
participant Mailer as メーラー
User->>App: コメント投稿
activate App
App->>App: コメント保存
App->>Mailer: 通知メール送信
deactivate App
Mailer-->>User: 投稿主に通知メール
うさぎが跳ねて知らせるよ、 コメントのリンク、飛んでいこう🐇 メールで知らせる、新しい光 投稿の下で、見つけられる❤
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Changes Lines
+93 additions, -28 deletions