diff options
author | Mislav Marohnić <mislav.marohnic@gmail.com> | 2008-04-18 17:19:28 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2008-04-18 17:19:28 -0500 |
commit | 69a5c1df8293fc8de2cec0fc9fa18181cb9ad469 (patch) | |
tree | f35567f2744c7e36a734d544818cbafc06d6c52e /railties/lib/rails_generator/generators/components/mailer | |
parent | 29ea0f68aa515f29fe440dabf6d40807e348b703 (diff) | |
download | rails-69a5c1df8293fc8de2cec0fc9fa18181cb9ad469.tar.gz rails-69a5c1df8293fc8de2cec0fc9fa18181cb9ad469.tar.bz2 rails-69a5c1df8293fc8de2cec0fc9fa18181cb9ad469.zip |
Add example for default_url_options[:host] to generated mailers.
Signed-off-by: Joshua Peek <josh@joshpeek.com>
Diffstat (limited to 'railties/lib/rails_generator/generators/components/mailer')
-rw-r--r-- | railties/lib/rails_generator/generators/components/mailer/templates/mailer.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/railties/lib/rails_generator/generators/components/mailer/templates/mailer.rb b/railties/lib/rails_generator/generators/components/mailer/templates/mailer.rb index 3a1724a62e..0c7e6bebaf 100644 --- a/railties/lib/rails_generator/generators/components/mailer/templates/mailer.rb +++ b/railties/lib/rails_generator/generators/components/mailer/templates/mailer.rb @@ -1,4 +1,7 @@ class <%= class_name %> < ActionMailer::Base + + # change to your domain name + default_url_options[:host] = 'example.com' <% for action in actions -%> def <%= action %>(sent_at = Time.now) @@ -7,7 +10,8 @@ class <%= class_name %> < ActionMailer::Base from '' sent_on sent_at - body :action => '<%= action %>' + body :greeting => 'Hi,' end <% end -%> + end |