Class: Spree::MailerPreviews::ReimbursementPreview

Inherits:
ActionMailer::Preview
  • Object
show all
Defined in:
lib/spree/mailer_previews/reimbursement_preview.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) reimbursement



4
5
6
7
8
# File 'lib/spree/mailer_previews/reimbursement_preview.rb', line 4

def reimbursement
  reimbursement = Reimbursement.last
  raise "Your database needs at least one Reimbursement to render this preview" unless reimbursement
  ReimbursementMailer.reimbursement_email(reimbursement)
end