diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-08-23 22:37:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-23 22:37:23 +0200 |
commit | 73ca0bb925cb036f824262ab292a157a40a515d0 (patch) | |
tree | 06373f7b57dc3976a647d703204505b49ec64e61 /app/mailers | |
parent | 37f612074efeb793fafbe19c90698b98b278447d (diff) |
Add option to include reported statuses in warning e-mail (#11639)
Diffstat (limited to 'app/mailers')
-rw-r--r-- | app/mailers/user_mailer.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb index 8f3a4ab3a..b41004acc 100644 --- a/app/mailers/user_mailer.rb +++ b/app/mailers/user_mailer.rb @@ -5,6 +5,7 @@ class UserMailer < Devise::Mailer helper :application helper :instance + helper :statuses add_template_helper RoutingHelper @@ -79,10 +80,11 @@ class UserMailer < Devise::Mailer end end - def warning(user, warning) + def warning(user, warning, status_ids = nil) @resource = user @warning = warning @instance = Rails.configuration.x.local_domain + @statuses = Status.where(id: status_ids).includes(:account) if status_ids.is_a?(Array) I18n.with_locale(@resource.locale || I18n.default_locale) do mail to: @resource.email, |