Sha256: 4b4a1ff541ccbcf1f80a1e66117daf69fe78e2bc356ae5b5837d97a3b1c8c3d0

Contents?: true

Size: 571 Bytes

Versions: 19

Compression:

Stored size: 571 Bytes

Contents

# frozen_string_literal: true

module Decidim
  # A custom mailer to notify Decidim users
  # that they have been reported
  class UserReportMailer < ApplicationMailer
    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
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
decidim-core-0.28.4 app/mailers/decidim/user_report_mailer.rb
decidim-core-0.27.9 app/mailers/decidim/user_report_mailer.rb
decidim-core-0.28.3 app/mailers/decidim/user_report_mailer.rb
decidim-core-0.27.8 app/mailers/decidim/user_report_mailer.rb
decidim-core-0.28.2 app/mailers/decidim/user_report_mailer.rb
decidim-core-0.27.7 app/mailers/decidim/user_report_mailer.rb
decidim-core-0.28.1 app/mailers/decidim/user_report_mailer.rb
decidim-core-0.27.6 app/mailers/decidim/user_report_mailer.rb
decidim-core-0.28.0 app/mailers/decidim/user_report_mailer.rb
decidim-core-0.27.5 app/mailers/decidim/user_report_mailer.rb
decidim-core-0.28.0.rc5 app/mailers/decidim/user_report_mailer.rb
decidim-core-0.28.0.rc4 app/mailers/decidim/user_report_mailer.rb
decidim-core-0.27.4 app/mailers/decidim/user_report_mailer.rb
decidim-core-0.27.3 app/mailers/decidim/user_report_mailer.rb
decidim-core-0.27.2 app/mailers/decidim/user_report_mailer.rb
decidim-core-0.27.1 app/mailers/decidim/user_report_mailer.rb
decidim-core-0.27.0 app/mailers/decidim/user_report_mailer.rb
decidim-core-0.27.0.rc2 app/mailers/decidim/user_report_mailer.rb
decidim-core-0.27.0.rc1 app/mailers/decidim/user_report_mailer.rb