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

Version Path
nimbleshop_core-0.0.4.beta1 app/mailers/admin_mailer.rb
nimbleshop_core-0.0.4 app/mailers/admin_mailer.rb
nimbleshop_core-0.0.3 app/mailers/admin_mailer.rb
nimbleshop_core-0.0.2 app/mailers/admin_mailer.rb
nimbleshop_core-0.0.2.beta1 app/mailers/admin_mailer.rb
nimbleshop_core-0.0.1 app/mailers/admin_mailer.rb
nimbleshop_core-0.0.1.rc6 app/mailers/admin_mailer.rb
nimbleshop_core-0.0.1.rc5 app/mailers/admin_mailer.rb
nimbleshop_core-0.0.1.rc4 app/mailers/admin_mailer.rb
nimbleshop_core-0.0.1.rc3 app/mailers/admin_mailer.rb
nimbleshop_core-0.0.1.rc2 app/mailers/admin_mailer.rb
nimbleshop_core-0.0.1.rc1 app/mailers/admin_mailer.rb