summaryrefslogtreecommitdiff
path: root/app/mailers
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-10-18 11:58:45 +0200
committerDouwe Maan <douwe@gitlab.com>2015-10-18 11:58:45 +0200
commit9f6dc2a4b2e5eca01f5712bd7ec4d007ad4e57e5 (patch)
tree08eac95f1443b84c57a737fbb0ee76ea221025ac /app/mailers
parentdc170516edb4760d9dc8843830459fe8066dff42 (diff)
downloadgitlab-ce-9f6dc2a4b2e5eca01f5712bd7ec4d007ad4e57e5.tar.gz
Only pass abuse report ID to AbuseReportMailer.
Diffstat (limited to 'app/mailers')
-rw-r--r--app/mailers/abuse_report_mailer.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/app/mailers/abuse_report_mailer.rb b/app/mailers/abuse_report_mailer.rb
index c8b9c9c1628..f0c41f69a5c 100644
--- a/app/mailers/abuse_report_mailer.rb
+++ b/app/mailers/abuse_report_mailer.rb
@@ -1,8 +1,12 @@
class AbuseReportMailer < BaseMailer
+ include Gitlab::CurrentSettings
- def notify(abuse_report, to_email)
- @abuse_report = abuse_report
+ def notify(abuse_report_id)
+ @abuse_report = AbuseReport.find(abuse_report_id)
- mail(to: to_email, subject: "[Gitlab] Abuse report filed for `#{@abuse_report.user.username}`")
+ mail(
+ to: current_application_settings.admin_notification_email,
+ subject: "#{@abuse_report.user.name} (#{@abuse_report.user.username}) was reported for abuse"
+ )
end
end