aboutsummaryrefslogblamecommitdiffstats
path: root/actionmailer/lib/rails/generators/mailer/templates/mailer.rb
blob: 88b074cef56bb148aca30d86492f6f3c77dafcae (plain) (tree)
1
2
3
4
5
6
7
8
9
                            
                                            
                                                      

                            


                                                                 
                                                             


                    
 
                                                 
     
          
   
          
<% module_namespacing do -%>
class <%= class_name %> < ActionMailer::Base
  default <%= key_value :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.<%= file_path.gsub("/",".") %>.<%= action %>.subject
  #
  def <%= action %>
    @greeting = "Hi"

    mail <%= key_value :to, '"to@example.org"' %>
  end
<% end -%>
end
<% end -%>