password reset i18n

This commit is contained in:
Pete Matsyburka
2025-12-02 14:25:45 +02:00
parent 5934bdec55
commit f1eaa77092
2 changed files with 6 additions and 1 deletions
+2
View File
@@ -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
+4 -1
View File
@@ -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