Class: Spree::ReimbursementMailer Private

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

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary (collapse)

Methods inherited from BaseMailer

#from_address, #mail, #money

Instance Method Details

- (Object) reimbursement_email(reimbursement, resend = false)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



3
4
5
6
7
8
9
# 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)
  store = @reimbursement.order.store
  subject = (resend ? "[#{Spree.t(:resend).upcase}] " : '')
  subject += "#{store.name} #{Spree.t('reimbursement_mailer.reimbursement_email.subject')} ##{@reimbursement.order.number}"
  mail(to: @reimbursement.order.email, from: from_address(store), subject: subject)
end