Class: AbuseReportMailer

Inherits:
BaseMailer
  • Object
show all
Includes:
Gitlab::CurrentSettings
Defined in:
app/mailers/abuse_report_mailer.rb

Instance Attribute Summary

Attributes inherited from BaseMailer

#current_user

Instance Method Summary collapse

Methods included from Gitlab::CurrentSettings

#current_application_settings, #fake_application_settings

Methods inherited from BaseMailer

#can?

Instance Method Details

#notify(abuse_report_id) ⇒ Object


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

def notify(abuse_report_id)
  return unless deliverable?

  @abuse_report = AbuseReport.find(abuse_report_id)

  mail(
    to:       current_application_settings.admin_notification_email,
    subject:  "#{@abuse_report.user.name} (#{@abuse_report.user.username}) was reported for abuse"
  )
end