forked from External/greenlight
Fix issue with flash messages and activation link (#454)
This commit is contained in:
committed by
Jesus Federico
parent
c595ba9895
commit
6bd5d81697
@ -30,9 +30,11 @@ class PasswordResetsController < ApplicationController
|
||||
if @user
|
||||
@user.create_reset_digest
|
||||
@user.send_password_reset_email(reset_link)
|
||||
redirect_to root_url, notice: I18n.t("email_sent")
|
||||
flash[:success] = I18n.t("email_sent")
|
||||
redirect_to root_path
|
||||
else
|
||||
redirect_to new_password_reset_path, alert: I18n.t("no_user_email_exists")
|
||||
flash[:alert] = I18n.t("no_user_email_exists")
|
||||
redirect_to new_password_reset_path
|
||||
end
|
||||
rescue => e
|
||||
logger.error "Error in email delivery: #{e}"
|
||||
|
Reference in New Issue
Block a user