Class: Workarea::Storefront::GiftCardMailerPreview

Inherits:
ActionMailer::Preview
  • Object
show all
Defined in:
lib/workarea/mailer_previews/storefront/gift_card_mailer_preview.rb

Instance Method Summary collapse

Instance Method Details

#createdObject



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/workarea/mailer_previews/storefront/gift_card_mailer_preview.rb', line 4

def created
  card = Payment::GiftCard.create!(
    amount: '100',
    order_id: 'WL-123456',
    to: '[email protected]',
    from: '[email protected]',
    message: 'Gift card message body',
    notify: true,
    purchased: true
  )
  GiftCardMailer.created(card.id)
end