Class: Voltron::NotificationMailer
- Inherits:
-
ApplicationMailer
- Object
- ApplicationMailer
- Voltron::NotificationMailer
- Defined in:
- app/mailers/voltron/notification_mailer.rb
Instance Method Summary collapse
Instance Method Details
#notify(mail_args, var_args = {}, attachment_args = {}) ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'app/mailers/voltron/notification_mailer.rb', line 4 def notify(mail_args, var_args = {}, = {}) # Make all passed in variables instance variables so they can be used in the template var_args.each { |name, value| instance_variable_set "@#{name}", value } # Add all of the attachments .each { |name, file| [name] = File.read(file) } mail mail_args end |