aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/lib/rails/generators/mailer/templates/mailer.rb.tt
diff options
context:
space:
mode:
Diffstat (limited to 'actionmailer/lib/rails/generators/mailer/templates/mailer.rb.tt')
-rw-r--r--actionmailer/lib/rails/generators/mailer/templates/mailer.rb.tt17
1 files changed, 17 insertions, 0 deletions
diff --git a/actionmailer/lib/rails/generators/mailer/templates/mailer.rb.tt b/actionmailer/lib/rails/generators/mailer/templates/mailer.rb.tt
new file mode 100644
index 0000000000..348d314758
--- /dev/null
+++ b/actionmailer/lib/rails/generators/mailer/templates/mailer.rb.tt
@@ -0,0 +1,17 @@
+<% module_namespacing do -%>
+class <%= class_name %>Mailer < ApplicationMailer
+<% actions.each do |action| -%>
+
+ # Subject can be set in your I18n file at config/locales/en.yml
+ # with the following lookup:
+ #
+ # en.<%= file_path.tr("/",".") %>_mailer.<%= action %>.subject
+ #
+ def <%= action %>
+ @greeting = "Hi"
+
+ mail to: "to@example.org"
+ end
+<% end -%>
+end
+<% end -%>