From 69a5c1df8293fc8de2cec0fc9fa18181cb9ad469 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Fri, 18 Apr 2008 17:19:28 -0500 Subject: Add example for default_url_options[:host] to generated mailers. Signed-off-by: Joshua Peek --- .../generators/components/mailer/templates/mailer.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'railties/lib/rails_generator') 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 -- cgit v1.2.3