debian-mirror-gitlab/app/mailers/abuse_report_mailer.rb

21 lines
491 B
Ruby
Raw Normal View History

2015-10-24 18:46:33 +05:30
class AbuseReportMailer < BaseMailer
include Gitlab::CurrentSettings
def notify(abuse_report_id)
return unless deliverable?
2015-10-24 18:46:33 +05:30
@abuse_report = AbuseReport.find(abuse_report_id)
mail(
to: current_application_settings.admin_notification_email,
2015-10-24 18:46:33 +05:30
subject: "#{@abuse_report.user.name} (#{@abuse_report.user.username}) was reported for abuse"
)
end
private
def deliverable?
current_application_settings.admin_notification_email.present?
end
2015-10-24 18:46:33 +05:30
end