Sha256: 5cc98320cad1c4870b2f9c21ecf0d9a111a9126c73ff8f21a07ab2fe6e297f83

Contents?: true

Size: 520 Bytes

Versions: 1

Compression:

Stored size: 520 Bytes

Contents

module Comable
  class OrderMailer < ActionMailer::Base
    helper Comable::ApplicationHelper
    helper_method :subject_for

    def complete(order)
      @order = order
      mail(from: current_store.email_sender, to: order.email, subject: subject_for(order))
    end

    private

    def current_store
      Comable::Store.instance
    end

    def subject_for(order)
      [
        current_store.name,
        I18n.t('comable.order_mailer.complete.subject'),
        order.code
      ].join(' ')
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
comable_core-0.2.0 app/mailers/comable/order_mailer.rb