Class: OrderMailer

Inherits:
ActionMailer::Base
  • Object
show all
Defined in:
app/mailers/order_mailer.rb

Overview

Default from (possibly bcc) and mail delivery method must be set up in production.rb (see rails docs)

Instance Method Summary collapse

Instance Method Details

#cancel(order) ⇒ Object



16
17
18
19
# File 'app/mailers/order_mailer.rb', line 16

def cancel(order)
  @order = order
  mail(to: @order.email, subject: "#{I18n.t(:order)} #{@order.number}")
end

#confirm(order) ⇒ Object



12
13
14
15
# File 'app/mailers/order_mailer.rb', line 12

def confirm(order)
  @order = order
  mail(to: @order.email, subject: "#{I18n.t(:order)} #{@order.number}")
end


20
21
22
23
# File 'app/mailers/order_mailer.rb', line 20

def paid(order)
  @order = order
  mail(to: @order.email, subject: "#{I18n.t(:order)} #{@order.number}")
end

#shipped(order) ⇒ Object



24
25
26
27
# File 'app/mailers/order_mailer.rb', line 24

def shipped(order)
  @order = order
  mail(to: @order.email, subject: "#{I18n.t(:order)} #{@order.number}")
end