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
Methods included from OrganizationHelper
#current_organization_name, #organization_colors, #organization_description_label, #organization_name
Methods included from TranslatableAttributes
Methods included from SanitizeHelper
#decidim_escape_translated, #decidim_html_escape, #decidim_sanitize, #decidim_sanitize_admin, #decidim_sanitize_editor, #decidim_sanitize_editor_admin, #decidim_sanitize_newsletter, #decidim_sanitize_translated, #decidim_url_escape, included
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: organization_name(report.moderation.user.organization), reason: @report.reason )) end end |