aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-01-26 16:00:57 +0100
committerJosé Valim <jose.valim@gmail.com>2010-01-26 16:00:57 +0100
commit1078677575b44ff2700cb6232b50d9c887e73c2b (patch)
tree47963e11e0eade3d92383b80b04783adae7d5275 /railties
parentd7de1c76cad28f52fc62693d415a07abf6c86ef5 (diff)
parent05c4ad9d3f6ff8d0017f4bca9b52e552629c4813 (diff)
downloadrails-1078677575b44ff2700cb6232b50d9c887e73c2b.tar.gz
rails-1078677575b44ff2700cb6232b50d9c887e73c2b.tar.bz2
rails-1078677575b44ff2700cb6232b50d9c887e73c2b.zip
Merge remote branch 'mikel/master'
Diffstat (limited to 'railties')
-rw-r--r--railties/lib/generators/rails/mailer/templates/mailer.rb4
-rw-r--r--railties/test/generators/mailer_generator_test.rb6
2 files changed, 5 insertions, 5 deletions
diff --git a/railties/lib/generators/rails/mailer/templates/mailer.rb b/railties/lib/generators/rails/mailer/templates/mailer.rb
index 1685b73633..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
- delivers_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
@@ -9,7 +9,7 @@ class <%= class_name %> < ActionMailer::Base
#
def <%= action %>
@greeting = "Hi"
- mail(:to => "to@example.com")
+ mail(:to => "to@example.org")
end
<% end -%>
end \ No newline at end of file
diff --git a/railties/test/generators/mailer_generator_test.rb b/railties/test/generators/mailer_generator_test.rb
index 99ce53323e..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 /delivers_from "from@example.com"/, mailer
+ assert_match /self\.defaults :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.com"\)/, 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.com"\)/, bar
+ assert_match /mail\(:to => "to@example.org"\)/, bar
assert_match /@greeting = "Hi"/, bar
end
end