Class: Spree::ReimbursementMailer

Inherits:
BaseMailer
  • Object
show all
Defined in:
app/mailers/spree/reimbursement_mailer.rb

Instance Method Summary collapse

Methods inherited from BaseMailer

#from_address, #frontend_available?, #mail, #money

Instance Method Details

#reimbursement_email(reimbursement, resend = false) ⇒ Object



3
4
5
6
7
8
# File 'app/mailers/spree/reimbursement_mailer.rb', line 3

def reimbursement_email(reimbursement, resend = false)
  @reimbursement = reimbursement.respond_to?(:id) ? reimbursement : Spree::Reimbursement.find(reimbursement)
  subject = (resend ? "[#{Spree.t(:resend).upcase}] " : '')
  subject += "#{Spree::Store.current.name} #{Spree.t('reimbursement_mailer.reimbursement_email.subject')} ##{@reimbursement.order.number}"
  mail(to: @reimbursement.order.email, from: from_address, subject: subject)
end