lib/rails/generators/rails/authentication/templates/app/controllers/passwords_controller.rb.tt in railties-8.0.0.rc1 vs lib/rails/generators/rails/authentication/templates/app/controllers/passwords_controller.rb.tt in railties-8.0.0.rc2
- old
+ new
@@ -8,26 +8,26 @@
def create
if user = User.find_by(email_address: params[:email_address])
PasswordsMailer.reset(user).deliver_later
end
- redirect_to new_session_url, notice: "Password reset instructions sent (if user with that email address exists)."
+ redirect_to new_session_path, notice: "Password reset instructions sent (if user with that email address exists)."
end
def edit
end
def update
if @user.update(params.permit(:password, :password_confirmation))
- redirect_to new_session_url, notice: "Password has been reset."
+ redirect_to new_session_path, notice: "Password has been reset."
else
- redirect_to edit_password_url(params[:token]), alert: "Passwords did not match."
+ redirect_to edit_password_path(params[:token]), alert: "Passwords did not match."
end
end
private
def set_user_by_token
@user = User.find_by_password_reset_token!(params[:token])
rescue ActiveSupport::MessageVerifier::InvalidSignature
- redirect_to new_password_url, alert: "Password reset link is invalid or has expired."
+ redirect_to new_password_path, alert: "Password reset link is invalid or has expired."
end
end