Class: Spree::BaseMailer

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

Instance Method Summary collapse

Instance Method Details

#from_addressObject


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

def from_address
  Spree::Config[:mails_from]
end

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


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

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

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


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

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