Class: Spree::ReimbursementMailer

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

Instance Method Summary collapse

Methods inherited from BaseMailer

#bcc_address, #from_address, #mail, #money

Instance Method Details

#reimbursement_email(reimbursement, resend = false) ⇒ Object



5
6
7
8
9
10
11
# File 'app/mailers/spree/reimbursement_mailer.rb', line 5

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