Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

devise update password

# /! Security /!

def update_password
  @user = current_user
  if @user.update(user_params)
    # Sign in the user by passing validation in case their password changed
    bypass_sign_in(@user)
    redirect_to root_path
  else
    render :edit
  end
end
 
PREVIOUS NEXT
Tagged: #devise #update #password
ADD COMMENT
Topic
Name
8+1 =