Class: AdminMailer
- Inherits:
-
ActionMailer::Base
- Object
- ActionMailer::Base
- AdminMailer
- Includes:
- ApplicationHelper
- Defined in:
- app/mailers/admin_mailer.rb
Instance Method Summary collapse
Instance Method Details
#new_order_notification(order_number) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'app/mailers/admin_mailer.rb', line 14 def new_order_notification(order_number) @order = Order.find_by_number!(order_number) @shop = Shop.current @payment_date = @order.purchased_at = { to: @order.email, subject: "Order ##{order_number} was recently placed" } mail() do |format| format.text { render "admin/mailer/new_order_notification" } end end |