Class: Decidim::UserReportMailer
- Inherits:
-
ApplicationMailer
- Object
- ActionMailer::Base
- ApplicationMailer
- Decidim::UserReportMailer
- Defined in:
- app/mailers/decidim/user_report_mailer.rb
Overview
A custom mailer to notify Decidim users that they have been reported
Instance Method Summary collapse
Instance Method Details
#notify(admin, report) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'app/mailers/decidim/user_report_mailer.rb', line 7 def notify(admin, report) @report = report @admin = admin @organization = report.moderation.user.organization with_user(admin) do mail(to: admin.email, subject: I18n.t( "decidim.user_report_mailer.notify.subject", organization_name: report.moderation.user.organization.name, reason: @report.reason )) end end |