diff options
author | Stefan Penner <stefan.penner@gmail.com> | 2010-01-27 22:44:56 -0600 |
---|---|---|
committer | Stefan Penner <stefan.penner@gmail.com> | 2010-01-27 22:44:56 -0600 |
commit | 3aa1ea1ae4baa4a03d03644e798eeb98a4745785 (patch) | |
tree | 199dab8c28aa5476373af32000159f38cda04cdc /railties | |
parent | 2ec99192d59e3f901b301d5735cee9a0b9ee091a (diff) | |
parent | 2c12a71378d2146c822acb389b00b866f6420ff5 (diff) | |
download | rails-3aa1ea1ae4baa4a03d03644e798eeb98a4745785.tar.gz rails-3aa1ea1ae4baa4a03d03644e798eeb98a4745785.tar.bz2 rails-3aa1ea1ae4baa4a03d03644e798eeb98a4745785.zip |
Merge branch 'rails/master' into ujs
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/generators/rails/mailer/templates/mailer.rb | 7 | ||||
-rw-r--r-- | railties/test/generators/mailer_generator_test.rb | 6 |
2 files changed, 7 insertions, 6 deletions
diff --git a/railties/lib/generators/rails/mailer/templates/mailer.rb b/railties/lib/generators/rails/mailer/templates/mailer.rb index cdc6e41266..7343eb28b3 100644 --- a/railties/lib/generators/rails/mailer/templates/mailer.rb +++ b/railties/lib/generators/rails/mailer/templates/mailer.rb @@ -1,5 +1,5 @@ class <%= class_name %> < ActionMailer::Base - self.defaults :from => "from@example.com" + default :from => "from@example.com" <% for action in actions -%> # Subject can be set in your I18n file at config/locales/en.yml @@ -9,7 +9,8 @@ class <%= class_name %> < ActionMailer::Base # def <%= action %> @greeting = "Hi" - mail(:to => "to@example.org") + + mail :to => "to@example.org" end <% end -%> -end
\ No newline at end of file +end diff --git a/railties/test/generators/mailer_generator_test.rb b/railties/test/generators/mailer_generator_test.rb index 0b7f5c6817..e6fc1bbb5c 100644 --- a/railties/test/generators/mailer_generator_test.rb +++ b/railties/test/generators/mailer_generator_test.rb @@ -9,7 +9,7 @@ class MailerGeneratorTest < Rails::Generators::TestCase run_generator assert_file "app/mailers/notifier.rb" do |mailer| assert_match /class Notifier < ActionMailer::Base/, mailer - assert_match /self\.defaults :from => "from@example.com"/, mailer + assert_match /default :from => "from@example.com"/, mailer end end @@ -61,12 +61,12 @@ class MailerGeneratorTest < Rails::Generators::TestCase assert_file "app/mailers/notifier.rb" do |mailer| assert_instance_method :foo, mailer do |foo| - assert_match /mail\(:to => "to@example.org"\)/, foo + assert_match /mail :to => "to@example.org"/, foo assert_match /@greeting = "Hi"/, foo end assert_instance_method :bar, mailer do |bar| - assert_match /mail\(:to => "to@example.org"\)/, bar + assert_match /mail :to => "to@example.org"/, bar assert_match /@greeting = "Hi"/, bar end end |