Clearly comment on the functionality of valid_password?

This commit is contained in:
Ian Ker-Seymer 2015-03-17 15:21:59 -06:00
parent 70ab38839f
commit 8743ce6cf8
No known key found for this signature in database
GPG Key ID: B8C2AE2E3AAB4FF5
1 changed files with 4 additions and 1 deletions

View File

@ -108,7 +108,10 @@ module Devise
params_auth_hash.is_a?(Hash)
end
# Check if password is present.
# Note: unlike `Model.valid_password?`, this method does not actually
# ensure that the password in the params matches the password stored in
# the database. It only checks if the password is *present*. Do not rely
# on this method for validating that a given password is correct.
def valid_password?
password.present?
end