app/models/user.rb
# Sets the password reset attributes.
Sets the password reset attributes.
Sets the password reset attributes .
def create_reset_digest
    self.reset_token = User.new_token
    update_columns(reset_digest: User.digest(reset_token),
                   reset_sent_at: Time.zone.now)
  end
def create_reset_digest self . reset_token = User . new_token update_columns ( reset_digest : User . digest ( reset_token ) , reset_sent_at : Time . zone . now ) end
Sets the password reset attributes.
Sets the password reset attributes .
# update_attribute(:reset_digest,  User.digest(reset_token)) # update_attribute(:reset_sent_at, Time.zone.now)