2
0

Set flash options via redirect where possible (#35370)

This commit is contained in:
Matt Jankowski
2025-07-24 04:03:28 -04:00
committed by GitHub
parent 67be8208db
commit 5c01ccc31f
5 changed files with 7 additions and 14 deletions

View File

@@ -19,8 +19,7 @@ class Auth::PasswordsController < Devise::PasswordsController
private
def redirect_invalid_reset_token
flash[:error] = I18n.t('auth.invalid_reset_password_token')
redirect_to new_password_path(resource_name)
redirect_to new_password_path(resource_name), flash: { error: t('auth.invalid_reset_password_token') }
end
def reset_password_token_is_valid?