Removed local variable in ReportMailer
This commit is contained in:
parent
045ced0518
commit
011db282b7
1 changed files with 2 additions and 4 deletions
|
|
@ -2,11 +2,9 @@ class ReportMailer < ActionMailer::Base
|
|||
default :from => AppConfig.mail.sender_address
|
||||
|
||||
def new_report(type, id)
|
||||
report_type = I18n.t('notifier.report_email.type.' + type)
|
||||
resource = {
|
||||
:subject => I18n.t('notifier.report_email.subject', :type => report_type),
|
||||
:url => report_index_url,
|
||||
:type => report_type,
|
||||
:type => I18n.t('notifier.report_email.type.' + type),
|
||||
:id => id
|
||||
}
|
||||
Role.admins.each do |role|
|
||||
|
|
@ -20,7 +18,7 @@ class ReportMailer < ActionMailer::Base
|
|||
|
||||
private
|
||||
def format(resource)
|
||||
mail(to: resource[:email], subject: resource[:subject]) do |format|
|
||||
mail(to: resource[:email], subject: I18n.t('notifier.report_email.subject', :type => resource[:type])) do |format|
|
||||
format.html { render 'report/report_email', :locals => { :resource => resource } }
|
||||
format.text { render 'report/report_email', :locals => { :resource => resource } }
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue