aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/lib/rails/generators/mailer/templates/mailer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionmailer/lib/rails/generators/mailer/templates/mailer.rb')
-rw-r--r--actionmailer/lib/rails/generators/mailer/templates/mailer.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/actionmailer/lib/rails/generators/mailer/templates/mailer.rb b/actionmailer/lib/rails/generators/mailer/templates/mailer.rb
new file mode 100644
index 0000000000..7343eb28b3
--- /dev/null
+++ b/actionmailer/lib/rails/generators/mailer/templates/mailer.rb
@@ -0,0 +1,16 @@
+class <%= class_name %> < ActionMailer::Base
+ default :from => "from@example.com"
+<% for action in actions -%>
+
+ # 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.org"
+ end
+<% end -%>
+end