Class: Mail::Notify::Mailer

Inherits:
ActionMailer::Base
  • Object
show all
Defined in:
lib/mail/notify/mailer.rb

Instance Method Summary collapse

Instance Method Details

#template_mail(template_id, headers) ⇒ Object

Raises:

  • (ArgumentError)


12
13
14
15
16
# File 'lib/mail/notify/mailer.rb', line 12

def template_mail(template_id, headers)
  raise ArgumentError, "You must specify a template ID" if template_id.blank?

  mail(headers.merge(body: "", subject: "", template_id: template_id))
end

#view_mail(template_id, headers) ⇒ Object

Raises:

  • (ArgumentError)


6
7
8
9
10
# File 'lib/mail/notify/mailer.rb', line 6

def view_mail(template_id, headers)
  raise ArgumentError, "You must specify a template ID" if template_id.blank?

  mail(headers.merge(template_id: template_id))
end