Class: OrderMailer

Inherits:
ActionMailer::QueueMailer
  • Object
show all
Defined in:
app/models/order_mailer.rb

Instance Method Summary collapse

Instance Method Details

#cancel(order) ⇒ Object



14
15
16
17
18
19
20
21
# File 'app/models/order_mailer.rb', line 14

def cancel(order)
  @subject    = '[CANCEL]' + Spree::Config[:site_name] + ' Order Confirmation #' + order.number
  @body       = {"order" => order}
  @recipients = order.email
  @from       = Spree::Config[:order_from]
  @bcc        = order_bcc
  @sent_on    = Time.now
end

#confirm(order, resend = false) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'app/models/order_mailer.rb', line 4

def confirm(order, resend = false)
  @subject    = (resend ? "[RESEND] " : "") 
  @subject    += Spree::Config[:site_name] + ' ' + 'Order Confirmation #' + order.number
  @body       = {"order" => order}
  @recipients = order.email
  @from       = Spree::Config[:order_from]
  @bcc        = order_bcc
  @sent_on    = Time.now
end