diff options
author | José Valim <jose.valim@gmail.com> | 2010-01-26 01:56:52 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-01-26 01:56:52 +0100 |
commit | abad097016bf5243e9812f6a031f421a986b09f7 (patch) | |
tree | f526a520a87db9c68ddd3436ce4bdb6f8c3182d1 /railties/lib/generators/rails/mailer | |
parent | 8974dac92e05dcab8ee552a5f40108c6ac25dc36 (diff) | |
parent | c02391f8f97182e818d22a0f0ec4a5589d2fff15 (diff) | |
download | rails-abad097016bf5243e9812f6a031f421a986b09f7.tar.gz rails-abad097016bf5243e9812f6a031f421a986b09f7.tar.bz2 rails-abad097016bf5243e9812f6a031f421a986b09f7.zip |
Merge remote branch 'mikel/master'
Diffstat (limited to 'railties/lib/generators/rails/mailer')
-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..1685b73633 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 "from@example.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 => "to@example.com") end - <% end -%> -end +end
\ No newline at end of file |