Sha256: 93b891923093551affe59ab31fd2ff4ed0e32bb1fcda2cf71d6d34a903ec985d
Contents?: true
Size: 603 Bytes
Versions: 12
Compression:
Stored size: 603 Bytes
Contents
class AdminMailer < ActionMailer::Base include ApplicationHelper default from: lambda { Shop.first.from_email } default_url_options[:host] = Nimbleshop.config.host_for_email default_url_options[:protocol] = 'http' def new_order_notification(order_number) @order = Order.find_by_number!(order_number) @shop = Shop.first @payment_date = @order.purchased_at mail_options = { to: @order.email, subject: "Order ##{order_number} was recently placed" } mail(mail_options) do |format| format.text { render "admin/mailer/new_order_notification" } end end end
Version data entries
12 entries across 12 versions & 1 rubygems