Class: Decidim::SpamDetection::SpamDetectionMailer

Inherits:
ApplicationMailer
  • Object
show all
Defined in:
app/mailers/decidim/spam_detection/spam_detection_mailer.rb

Instance Method Summary collapse

Instance Method Details

#notify_detection(user, results) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
# File 'app/mailers/decidim/spam_detection/spam_detection_mailer.rb', line 8

def notify_detection(user, results)
  with_user(user) do
    @reported_count = results[:reported_user]
    @blocked_count = results[:blocked_user]
    @organization = user.organization
    @user = user

    subject = I18n.t("notify_detection.subject", scope: "decidim.spam_detection_mailer")
    mail(to: @user.email, subject: subject)
  end
end