From 1504e0b4ccd1a859ca7c3ec8ec89c8c8d425e7ae Mon Sep 17 00:00:00 2001 From: AntonioTerceiro Date: Wed, 25 Jul 2007 20:35:12 +0000 Subject: [PATCH] ActionItem9: minor doc work --- app/models/user.rb | 4 ++++ 1 file changed, 4 insertions(+), 0 deletions(-) diff --git a/app/models/user.rb b/app/models/user.rb index 5647677..9572406 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -65,6 +65,10 @@ class User < ActiveRecord::Base class IncorrectPassword < Exception; end # Changes the password of a user. + # + # * Raises IncorrectPassword if current is different from the user's + # current password. + # * Saves the record unless it is a new one. def change_password!(current, new, confirmation) raise IncorrectPassword unless self.authenticated?(current) self.password = new -- libgit2 0.21.2