diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2017-11-13 15:23:28 -0500 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2017-11-13 15:23:28 -0500 |
commit | 8dd76a7a6ff1bb7105beabb8f834ca54ab1e5fc2 (patch) | |
tree | 9830dad2b5514f9c1600036a81433266ddec3250 /actionmailer/lib/rails/generators/mailer/templates/mailer.rb.tt | |
parent | 705cf47033afabf4530a209f907ff4bf35acf2c2 (diff) | |
download | rails-8dd76a7a6ff1bb7105beabb8f834ca54ab1e5fc2.tar.gz rails-8dd76a7a6ff1bb7105beabb8f834ca54ab1e5fc2.tar.bz2 rails-8dd76a7a6ff1bb7105beabb8f834ca54ab1e5fc2.zip |
Use .tt extension to all the template files
Make clear that the files are not to be run for interpreters.
Fixes #23847.
Fixes #30690.
Closes #23878.
Diffstat (limited to 'actionmailer/lib/rails/generators/mailer/templates/mailer.rb.tt')
-rw-r--r-- | actionmailer/lib/rails/generators/mailer/templates/mailer.rb.tt | 17 |
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 -%> |