Permalink
Browse files

add to_s just in case

  • Loading branch information...
drhenner committed Sep 19, 2014
1 parent bd8edcf commit 25fe5ebb2f193978e9f9967c9dfe6be5716e8650
Showing with 11 additions and 11 deletions.
  1. +11 −11 app/controllers/customer/password_resets_controller.rb
@@ -8,16 +8,16 @@ def new
end
def create
@user = User.find_by_email(params[:user][:email])
if @user
@user.deliver_password_reset_instructions!
flash[:notice] = 'Instructions to reset your password have been emailed.'
render :template => '/customer/password_resets/confirmation'
else
@user = User.new
flash[:notice] = 'No user was found with that email address'
render :action => 'new'
end
@user = User.find_by_email(params[:user][:email])
if @user
@user.deliver_password_reset_instructions!
flash[:notice] = 'Instructions to reset your password have been emailed.'
render :template => '/customer/password_resets/confirmation'
else
@user = User.new
flash[:notice] = 'No user was found with that email address'
render :action => 'new'
end
end
def edit
@@ -39,7 +39,7 @@ def update
protected
def load_user_using_perishable_token
unless @user = User.find_by_perishable_token( params[:id])
unless @user = User.find_by_perishable_token( params[:id].to_s )
flash[:notice] = 'The link you used in no longer valid. Click the password reset link to get a new link to reset your password.'
redirect_to login_url and return
end

0 comments on commit 25fe5eb

Please sign in to comment.