Fix #1624 - Send e-mail notifications to admins about new reports (#3949)

This commit is contained in:
Eugen Rochko 2017-06-27 00:04:00 +02:00 committed by GitHub
parent a91d968cab
commit 42b8220632
7 changed files with 46 additions and 14 deletions

View file

@ -0,0 +1,13 @@
# frozen_string_literal: true
class AdminMailer < ApplicationMailer
def new_report(recipient, report)
@report = report
@me = recipient
@instance = Rails.configuration.x.local_domain
locale_for_account(@me) do
mail to: @me.user_email, subject: I18n.t('admin_mailer.new_report.subject', instance: @instance, id: @report.id)
end
end
end