password reset i18n
This commit is contained in:
@@ -5,6 +5,8 @@ class PasswordsController < Devise::PasswordsController
|
||||
skip_before_action :require_no_authentication, only: %i[edit update]
|
||||
# rubocop:enable Rails/LexicallyScopedActionFilter
|
||||
|
||||
around_action :with_browser_locale
|
||||
|
||||
class Current < ActiveSupport::CurrentAttributes
|
||||
attribute :user
|
||||
end
|
||||
|
||||
@@ -17,7 +17,10 @@ module Devise
|
||||
assign_message_metadata(action, record)
|
||||
|
||||
initialize_from_record(record)
|
||||
mail(headers_for(action, opts), &)
|
||||
|
||||
I18n.with_locale(record.account.locale) do
|
||||
mail(headers_for(action, opts), &)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user