Class: Spree::BaseMailer

Inherits:
ActionMailer::Base
  • Object
show all
Defined in:
core/app/mailers/spree/base_mailer.rb

Instance Method Summary collapse

Instance Method Details

#from_address(store) ⇒ Object



5
6
7
# File 'core/app/mailers/spree/base_mailer.rb', line 5

def from_address(store)
  store.mail_from_address
end

#mail(headers = {}, &block) ⇒ Object



14
15
16
# File 'core/app/mailers/spree/base_mailer.rb', line 14

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

#money(amount, currency = Spree::Config[:currency]) ⇒ Object



9
10
11
# File 'core/app/mailers/spree/base_mailer.rb', line 9

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