Class: AbuseReportMailer

Inherits:
ApplicationMailer show all
Defined in:
app/mailers/abuse_report_mailer.rb

Instance Attribute Summary

Attributes inherited from ApplicationMailer

#current_user

Instance Method Summary collapse

Methods inherited from ApplicationMailer

#can?

Instance Method Details

#notify(abuse_report_id) ⇒ Object


8
9
10
11
12
13
14
15
16
17
# File 'app/mailers/abuse_report_mailer.rb', line 8

def notify(abuse_report_id)
  return unless deliverable?

  @abuse_report = AbuseReport.find(abuse_report_id)

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