diff options
Diffstat (limited to 'railties/lib/generators/rails/mailer/templates/mailer.rb')
-rw-r--r-- | railties/lib/generators/rails/mailer/templates/mailer.rb | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/railties/lib/generators/rails/mailer/templates/mailer.rb b/railties/lib/generators/rails/mailer/templates/mailer.rb index 90e0b712d6..5e7ef42370 100644 --- a/railties/lib/generators/rails/mailer/templates/mailer.rb +++ b/railties/lib/generators/rails/mailer/templates/mailer.rb @@ -1,14 +1,15 @@ class <%= class_name %> < ActionMailer::Base + delivers_from "mail@<%= application_name %>.com" <% for action in actions -%> - def <%= action %>(sent_at = Time.now) - subject '<%= class_name %>#<%= action %>' - recipients '' - from '' - sent_on sent_at - - body :greeting => 'Hi,' + # Subject can be set in your I18n file at config/locales/en.yml + # with the following lookup: + # + # en.actionmailer.<%= file_name %>.<%= action %>.subject + # + def <%= action %> + @greeting = "Hi" + mail(:to => "") end - <% end -%> -end +end
\ No newline at end of file |