aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorJosé Valim and Mikel Lindsaar <pair@programming.com>2010-01-26 11:48:25 +0100
committerJosé Valim and Mikel Lindsaar <pair@programming.com>2010-01-26 11:48:25 +0100
commit8fabcb2eca03150b1c0c3dbc88dd13123f76894f (patch)
tree3108f425650168b36920aa7bd8a36644cf35394c /railties
parent39a1b06f13221e00ab38dff960155cb5fe9eaabb (diff)
downloadrails-8fabcb2eca03150b1c0c3dbc88dd13123f76894f.tar.gz
rails-8fabcb2eca03150b1c0c3dbc88dd13123f76894f.tar.bz2
rails-8fabcb2eca03150b1c0c3dbc88dd13123f76894f.zip
Update generators to use new defaults.
Diffstat (limited to 'railties')
-rw-r--r--railties/lib/generators/rails/mailer/templates/mailer.rb2
-rw-r--r--railties/test/generators/mailer_generator_test.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/generators/rails/mailer/templates/mailer.rb b/railties/lib/generators/rails/mailer/templates/mailer.rb
index df9d0a0923..cdc6e41266 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" }
+ self.defaults :from => "from@example.com"
<% for action in actions -%>
# Subject can be set in your I18n file at config/locales/en.yml
diff --git a/railties/test/generators/mailer_generator_test.rb b/railties/test/generators/mailer_generator_test.rb
index e585298a93..0b7f5c6817 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 /self\.defaults :from => "from@example.com"/, mailer
end
end