app/controllers/password_resets_controller.rb
#updates the users password
#makes sure the the users password field is not empty
updates the users password
makes sure the the users password field is not empty
updates the users password makes sure the the users password field is not empty
def update
    if params[:user][:password].empty?
      @user.errors.add(:password, "can't be empty")
      render 'edit'
    elsif @user.update_attributes(user_params)
      log_in @user
      flash[:success] = "Password has been reset."
      redirect_to @user
    else
      render 'edit'
    end
  end
def update if params [ :user ] [ :password ] . empty? @user . errors . add ( :password , "can't be empty" ) render 'edit' elsif @user . update_attributes ( user_params ) log_in @user flash [ :success ] = "Password has been reset." redirect_to @user else render 'edit' end end
updates the users password
makes sure the the users password field is not empty
updates the users password makes sure the the users password field is not empty