From 4a1f43878105d701fd2dd769ec3cf7e81d133c09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Mon, 9 Nov 2009 16:35:31 -0200 Subject: Change mailer subjects lookup. --- actionmailer/lib/action_mailer/base.rb | 4 ++-- actionmailer/test/mail_service_test.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 293af01bbf..6a5a598f94 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -465,8 +465,8 @@ module ActionMailer #:nodoc: create_parts # Set the subject if not set yet - @subject ||= I18n.t(method_name, :scope => [:actionmailer, :subjects, mailer_name], - :default => method_name.humanize) + @subject ||= I18n.t(:subject, :scope => [:actionmailer, mailer_name, method_name], + :default => method_name.humanize) # build the mail object itself @mail = create_mail diff --git a/actionmailer/test/mail_service_test.rb b/actionmailer/test/mail_service_test.rb index f9365ea90c..c98f0a7601 100644 --- a/actionmailer/test/mail_service_test.rb +++ b/actionmailer/test/mail_service_test.rb @@ -402,7 +402,7 @@ class ActionMailerTest < Test::Unit::TestCase assert_nothing_raised { TestMailer.deliver_subject_with_i18n(@recipient) } assert_equal "Subject with i18n", ActionMailer::Base.deliveries.first.subject - I18n.backend.store_translations('en', :actionmailer => {:subjects => {:test_mailer => {:subject_with_i18n => "New Subject!"}}}) + I18n.backend.store_translations('en', :actionmailer => {:test_mailer => {:subject_with_i18n => {:subject => "New Subject!"}}}) assert_nothing_raised { TestMailer.deliver_subject_with_i18n(@recipient) } assert_equal "New Subject!", ActionMailer::Base.deliveries.last.subject end -- cgit v1.2.3