Module: Emails::Notes

Included in:
Notify
Defined in:
app/mailers/emails/notes.rb

Instance Method Summary collapse

Instance Method Details

#note_commit_email(recipient_id, note_id) ⇒ Object


3
4
5
6
7
8
9
10
11
12
13
# File 'app/mailers/emails/notes.rb', line 3

def note_commit_email(recipient_id, note_id)
  setup_note_mail(note_id, recipient_id)

  @commit = @note.noteable
  @target_url = namespace_project_commit_url(*note_target_url_options)

  mail_answer_thread(@commit,
                     from: sender(@note.author_id),
                     to: recipient(recipient_id),
                     subject: subject("#{@commit.title} (#{@commit.short_id})"))
end

#note_issue_email(recipient_id, note_id) ⇒ Object


15
16
17
18
19
20
21
# File 'app/mailers/emails/notes.rb', line 15

def note_issue_email(recipient_id, note_id)
  setup_note_mail(note_id, recipient_id)

  @issue = @note.noteable
  @target_url = namespace_project_issue_url(*note_target_url_options)
  mail_answer_thread(@issue, note_thread_options(recipient_id))
end

#note_merge_request_email(recipient_id, note_id) ⇒ Object


23
24
25
26
27
28
29
# File 'app/mailers/emails/notes.rb', line 23

def note_merge_request_email(recipient_id, note_id)
  setup_note_mail(note_id, recipient_id)

  @merge_request = @note.noteable
  @target_url = namespace_project_merge_request_url(*note_target_url_options)
  mail_answer_thread(@merge_request, note_thread_options(recipient_id))
end

#note_snippet_email(recipient_id, note_id) ⇒ Object


31
32
33
34
35
36
37
# File 'app/mailers/emails/notes.rb', line 31

def note_snippet_email(recipient_id, note_id)
  setup_note_mail(note_id, recipient_id)

  @snippet = @note.noteable
  @target_url = namespace_project_snippet_url(*note_target_url_options)
  mail_answer_thread(@snippet, note_thread_options(recipient_id))
end