mailer.rb 453 B

123456789101112131415161718
  1. <% module_namespacing do -%>
  2. class <%= class_name %> < ActionMailer::Base
  3. default <%= key_value :from, '"from@example.com"' %>
  4. <% actions.each do |action| -%>
  5. # Subject can be set in your I18n file at config/locales/en.yml
  6. # with the following lookup:
  7. #
  8. # en.<%= file_path.gsub("/",".") %>.<%= action %>.subject
  9. #
  10. def <%= action %>
  11. @greeting = "Hi"
  12. mail <%= key_value :to, '"to@example.org"' %>
  13. end
  14. <% end -%>
  15. end
  16. <% end -%>