mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-05 22:26:07 +00:00
DRY code and have more consistency. We always use "Terms of service" now and not "Terms of Service" or "Terms and conditions". The latter is used for the shop's terms, not the platform terms.
29 lines
562 B
Ruby
29 lines
562 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Spree
|
|
class BaseMailer < ActionMailer::Base
|
|
# Inline stylesheets
|
|
include Roadie::Rails::Automatic
|
|
|
|
helper TermsAndConditionsHelper
|
|
|
|
layout 'mailer'
|
|
|
|
def from_address
|
|
Spree::Config[:mails_from]
|
|
end
|
|
|
|
def money(amount)
|
|
Spree::Money.new(amount).to_s
|
|
end
|
|
helper_method :money
|
|
|
|
protected
|
|
|
|
def roadie_options
|
|
# This lets us specify assets using relative paths in email templates
|
|
super.merge(url_options: { host: URI(main_app.root_url).host })
|
|
end
|
|
end
|
|
end
|