Sha256: afa86b7f99ec0b84de280c16cd556bed377346c0d6e107c64ca03e40463f2ab1

Contents?: true

Size: 577 Bytes

Versions: 6

Compression:

Stored size: 577 Bytes

Contents

module PowerShop
  class OrderNotifications < ActionMailer::Base
    default from: "from@example.com"

    def for_admin(order)
      @order = order
      mail(
        to: admin_emails,
        subject: 'На сайте оформлен заказ',
        content_type: "text/html"
      )
    end

    def for_user(order, user_email)
      @order = order
      mail(
        to: user_email,
        subject: 'Спасибо за заказ',
        content_type: "text/html"
      )
    end

    protected

    def admin_emails
      'admin@example.com'
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
power_shop-0.2.4 app/mailers/power_shop/order_notifications.rb
power_shop-0.2.3 app/mailers/power_shop/order_notifications.rb
power_shop-0.2.2 app/mailers/power_shop/order_notifications.rb
power_shop-0.2.1 app/mailers/power_shop/order_notifications.rb
power_shop-0.2.0 app/mailers/power_shop/order_notifications.rb
power_shop-0.1.1 app/mailers/power_shop/order_notifications.rb