application_mailer.rb 282 B

12345678910111213141516
  1. # frozen_string_literal: true
  2. class ApplicationMailer < ActionMailer::Base
  3. layout 'mailer'
  4. helper :application
  5. helper :instance
  6. protected
  7. def locale_for_account(account)
  8. I18n.with_locale(account.user_locale || I18n.default_locale) do
  9. yield
  10. end
  11. end
  12. end