From 011db282b7f37ea50805fbadf0474728d4564c40 Mon Sep 17 00:00:00 2001 From: Lukas Matt Date: Mon, 24 Mar 2014 11:36:52 -0400 Subject: [PATCH] Removed local variable in ReportMailer --- app/mailers/report_mailer.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/mailers/report_mailer.rb b/app/mailers/report_mailer.rb index 143f22d8b..5438bd9a7 100644 --- a/app/mailers/report_mailer.rb +++ b/app/mailers/report_mailer.rb @@ -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