diff options
Diffstat (limited to 'railties/lib/rails_generator/generators/components/mailer/templates/mailer.rb')
-rw-r--r-- | railties/lib/rails_generator/generators/components/mailer/templates/mailer.rb | 16 |
1 files changed, 10 insertions, 6 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 127495fcbb..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,13 +1,17 @@ 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) - @subject = '<%= class_name %>#<%= action %>' - @body = {} - @recipients = '' - @from = '' - @sent_on = sent_at - @headers = {} + subject '<%= class_name %>#<%= action %>' + recipients '' + from '' + sent_on sent_at + + body :greeting => 'Hi,' end <% end -%> + end |