diff options
author | José Valim <jose.valim@gmail.com> | 2009-11-09 16:35:31 -0200 |
---|---|---|
committer | Yehuda Katz <wycats@Yehuda-Katz.local> | 2009-11-09 10:57:53 -0800 |
commit | 4a1f43878105d701fd2dd769ec3cf7e81d133c09 (patch) | |
tree | 6265b931ce5c5d26506914b5fb7eb9323ba41adb | |
parent | 83f329f5f30567a10bc96410da230bf986db8ad4 (diff) | |
download | rails-4a1f43878105d701fd2dd769ec3cf7e81d133c09.tar.gz rails-4a1f43878105d701fd2dd769ec3cf7e81d133c09.tar.bz2 rails-4a1f43878105d701fd2dd769ec3cf7e81d133c09.zip |
Change mailer subjects lookup.
-rw-r--r-- | actionmailer/lib/action_mailer/base.rb | 4 | ||||
-rw-r--r-- | 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 |