Class: NimbleshopSimply::Mailer
- Inherits:
-
ActionMailer::Base
- Object
- ActionMailer::Base
- NimbleshopSimply::Mailer
- Defined in:
- app/mailers/nimbleshop_simply/mailer.rb
Instance Method Summary collapse
- #order_notification_to_buyer(order_number) ⇒ Object
- #shipment_notification_to_buyer(order_number) ⇒ Object
Instance Method Details
#order_notification_to_buyer(order_number) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 |
# File 'app/mailers/nimbleshop_simply/mailer.rb', line 17 def order_notification_to_buyer(order_number) subject = "Order confirmation for order ##{order_number}" @order = Order.find_by_number!(order_number) @shop = Shop.current @payment_date = @order.created_at.to_s(:long) || @order.purchased_at.to_s(:long) = {to: @order.email, subject: subject} mail() end |
#shipment_notification_to_buyer(order_number) ⇒ Object
29 30 31 32 33 34 35 36 |
# File 'app/mailers/nimbleshop_simply/mailer.rb', line 29 def shipment_notification_to_buyer(order_number) subject = "Items for order ##{order_number} have been shipped" @order = Order.find_by_number!(order_number) @shipment = @order.shipments.first = {to: @order.email, subject: subject} mail() end |