mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-11 18:26:50 +00:00
Roadie doesn't work with asset host: * https://github.com/Mange/roadie-rails?tab=readme-ov-file#known-issues And we don't need it.
25 lines
539 B
Ruby
25 lines
539 B
Ruby
# frozen_string_literal: true
|
|
|
|
class ApplicationMailer < ActionMailer::Base
|
|
# Inline stylesheets
|
|
include Roadie::Rails::Automatic
|
|
|
|
helper TermsAndConditionsHelper
|
|
|
|
default from: -> { Spree::Config[:mails_from] }
|
|
layout 'mailer'
|
|
|
|
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
|
|
url = URI(main_app.root_url)
|
|
super.merge(url_options: { host: url.host, port: url.port })
|
|
end
|
|
end
|