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_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
6 7 8 9 |
# File 'app/mailers/caboose/orders_mailer.rb', line 6 def customer_new_order(order) @order = order mail(:to => order.customer.email, :subject => 'Thank you for your order!') end |
#customer_status_updated(order) ⇒ Object
Sends a notification email to the customer that the status of the order has been changed
24 25 26 27 |
# File 'app/mailers/caboose/orders_mailer.rb', line 24 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
12 13 14 15 |
# File 'app/mailers/caboose/orders_mailer.rb', line 12 def fulfillment_new_order(order) @order = order mail(:to => Caboose::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
18 19 20 21 |
# File 'app/mailers/caboose/orders_mailer.rb', line 18 def shipping_order_ready(order) @order = order mail(:to => Caboose::shipping_email, :subject => 'Order ready for shipping') end |