diff options
Diffstat (limited to 'app/mailers/emails/reviews.rb')
-rw-r--r-- | app/mailers/emails/reviews.rb | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/app/mailers/emails/reviews.rb b/app/mailers/emails/reviews.rb index b98fa8aa6c9..ed1166509a5 100644 --- a/app/mailers/emails/reviews.rb +++ b/app/mailers/emails/reviews.rb @@ -19,17 +19,16 @@ module Emails end def setup_review_email(review_id, recipient_id) - review = Review.find_by_id(review_id) - - @notes = review.notes - @discussions = Discussion.build_discussions(review.discussion_ids, preload_note_diff_file: true) + @review = Review.find_by_id(review_id) + @notes = @review.notes + @discussions = Discussion.build_discussions(@review.discussion_ids, preload_note_diff_file: true) @include_diff_discussion_stylesheet = @discussions.values.any? do |discussion| discussion.diff_discussion? && discussion.on_text? end - @author = review.author - @author_name = review.author_name - @project = review.project - @merge_request = review.merge_request + @author = @review.author + @author_name = @review.author_name + @project = @review.project + @merge_request = @review.merge_request @target_url = project_merge_request_url(@project, @merge_request) @sent_notification = SentNotification.record(@merge_request, recipient_id, reply_key) end |