2016-11-15 16:56:29 +01:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-03-19 19:20:07 +01:00
|
|
|
class ApplicationMailer < ActionMailer::Base
|
|
|
|
layout 'mailer'
|
2018-01-16 03:29:11 +01:00
|
|
|
|
2018-01-29 00:22:20 +01:00
|
|
|
helper :application
|
2017-04-18 00:16:32 +02:00
|
|
|
helper :instance
|
2018-01-16 03:29:11 +01:00
|
|
|
helper :mailer
|
2017-06-27 00:04:00 +02:00
|
|
|
|
|
|
|
protected
|
|
|
|
|
|
|
|
def locale_for_account(account)
|
|
|
|
I18n.with_locale(account.user_locale || I18n.default_locale) do
|
|
|
|
yield
|
|
|
|
end
|
|
|
|
end
|
2016-03-19 19:20:07 +01:00
|
|
|
end
|