Module: Emails::Releases

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

Instance Method Summary collapse

Instance Method Details

#new_release_email(user_id, release, reason = nil) ⇒ Object


5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'app/mailers/emails/releases.rb', line 5

def new_release_email(user_id, release, reason = nil)
  @release = release
  @project = @release.project
  @target_url = namespace_project_releases_url(
    namespace_id: @project.namespace,
    project_id: @project
  )

  user = User.find(user_id)

  mail(
    to: user.notification_email_for(@project.group),
    subject: subject(release_email_subject)
  )
end