password reset i18n

pull/402/head^2^2
Pete Matsyburka 2 weeks ago
parent 5934bdec55
commit f1eaa77092

@ -5,6 +5,8 @@ class PasswordsController < Devise::PasswordsController
skip_before_action :require_no_authentication, only: %i[edit update] skip_before_action :require_no_authentication, only: %i[edit update]
# rubocop:enable Rails/LexicallyScopedActionFilter # rubocop:enable Rails/LexicallyScopedActionFilter
around_action :with_browser_locale
class Current < ActiveSupport::CurrentAttributes class Current < ActiveSupport::CurrentAttributes
attribute :user attribute :user
end end

@ -17,11 +17,14 @@ module Devise
assign_message_metadata(action, record) assign_message_metadata(action, record)
initialize_from_record(record) initialize_from_record(record)
I18n.with_locale(record.account.locale) do
mail(headers_for(action, opts), &) mail(headers_for(action, opts), &)
end end
end end
end end
end end
end
# Assuming you have not yet modified this file, each configuration option below # Assuming you have not yet modified this file, each configuration option below
# is set to its default value. Note that some are commented out while others # is set to its default value. Note that some are commented out while others

Loading…
Cancel
Save