Class: Caboose::OrdersMailer
- Inherits:
-
ActionMailer::Base
- Object
- ActionMailer::Base
- Caboose::OrdersMailer
- Defined in:
- app/mailers/caboose/orders_mailer.rb
Instance Method Summary collapse
-
#customer_new_order(order) ⇒ Object
Sends a confirmation email to the customer about a new order.
-
#customer_payment_authorization(order) ⇒ Object
Sends an email to the customer telling them they need to authorize payment on an order.
-
#customer_status_updated(order) ⇒ Object
Sends a notification email to the customer that the status of the order has been changed.
-
#fulfillment_new_order(order) ⇒ Object
Sends a notification email to the fulfillment dept about a new order.
-
#shipping_order_ready(order) ⇒ Object
Sends a notification email to the shipping dept that an order is ready to be shipped.
Instance Method Details
#customer_new_order(order) ⇒ Object
Sends a confirmation email to the customer about a new order
22 23 24 25 |
# File 'app/mailers/caboose/orders_mailer.rb', line 22 def customer_new_order(order) @order = order mail(:to => order.customer.email, :subject => 'Thank you for your order!') end |
#customer_payment_authorization(order) ⇒ Object
Sends an email to the customer telling them they need to authorize payment on an order
48 49 50 51 |
# File 'app/mailers/caboose/orders_mailer.rb', line 48 def (order) @order = order mail(:to => order.customer.email, :subject => "Order #{@order.order_number} ready for payment") end |
#customer_status_updated(order) ⇒ Object
Sends a notification email to the customer that the status of the order has been changed
42 43 44 45 |
# File 'app/mailers/caboose/orders_mailer.rb', line 42 def customer_status_updated(order) @order = order mail(:to => order.customer.email, :subject => 'Order status update') end |
#fulfillment_new_order(order) ⇒ Object
Sends a notification email to the fulfillment dept about a new order
28 29 30 31 32 |
# File 'app/mailers/caboose/orders_mailer.rb', line 28 def fulfillment_new_order(order) @order = order sc = order.site.store_config mail(:to => sc.fulfillment_email, :subject => 'New Order') end |
#shipping_order_ready(order) ⇒ Object
Sends a notification email to the shipping dept that an order is ready to be shipped
35 36 37 38 39 |
# File 'app/mailers/caboose/orders_mailer.rb', line 35 def shipping_order_ready(order) @order = order sc = order.site.store_config mail(:to => sc.shipping_email, :subject => 'Order ready for shipping') end |