aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/lib/rails/generators/mailer/templates/mailer.rb
blob: 348d3147586bee13c795dbfedce690d81c4bc54e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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 -%>