app/models/user.rb
# resets the password, updating the record
resets the password, updating the record
resets the password updating the record
def reset_password
    plaintext = User.random_password
    self.password = self.password_confirmation = plaintext
    save!
    plaintext
  end
def reset_password plaintext = User . random_password self . password = self . password_confirmation = plaintext save! plaintext end
resets the password, updating the record
resets the password updating the record