Class: Decidim::ReportedMailer
- Inherits:
-
ApplicationMailer
- Object
- ActionMailer::Base
- ApplicationMailer
- Decidim::ReportedMailer
- Defined in:
- app/mailers/decidim/reported_mailer.rb
Overview
A custom mailer for sending notifications to an admin when a report is created..
Instance Method Summary collapse
Instance Method Details
#hide(user, report) ⇒ Object
21 22 23 24 25 26 27 28 29 30 |
# File 'app/mailers/decidim/reported_mailer.rb', line 21 def hide(user, report) with_user(user) do @report = report @participatory_space = @report.moderation.participatory_space @organization = user.organization @user = user subject = I18n.t("hide.subject", scope: "decidim.reported_mailer") mail(to: user.email, subject: subject) end end |
#report(user, report) ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'app/mailers/decidim/reported_mailer.rb', line 10 def report(user, report) with_user(user) do @report = report @participatory_space = @report.moderation.participatory_space @organization = user.organization @user = user subject = I18n.t("report.subject", scope: "decidim.reported_mailer") mail(to: user.email, subject: subject) end end |