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