app/controllers/users_controller.rb
#Update user profile info, handles both successful and unseccussful cases
Update user profile info, handles both successful and unseccussful cases
Update user profile info handles both successful and unseccussful cases
def update
    if @user.update_attributes(user_params)
      flash[:success] = "Profile updated successfully"
      redirect_to @user
    else 
      render 'edit'
    end
  end
def update if @user . update_attributes ( user_params ) flash [ :success ] = "Profile updated successfully" redirect_to @user else render 'edit' end end
Update user profile info, handles both successful and unseccussful cases
Update user profile info handles both successful and unseccussful cases