Sha256: 35aeeaf1ea01b4b9e70b7d27e4080f92770d78af3022f264885a29acef07b867

Contents?: true

Size: 450 Bytes

Versions: 3

Compression:

Stored size: 450 Bytes

Contents

# frozen_string_literal: true

module Spree
  class BaseMailer < ActionMailer::Base
    def from_address(store)
      store.mail_from_address
    end

    def bcc_address(store)
      store.bcc_email
    end

    def money(amount, currency = Spree::Config[:currency])
      Spree::Money.new(amount, currency:).to_s
    end
    helper_method :money

    def mail(headers = {}, &block)
      super if Spree::Config[:send_core_emails]
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
solidus_core-4.4.2 app/mailers/spree/base_mailer.rb
solidus_core-4.4.1 app/mailers/spree/base_mailer.rb
solidus_core-4.4.0 app/mailers/spree/base_mailer.rb