mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
*_digest is defined as a public method
This commit is contained in:
parent
b45b9ac05e
commit
98fda672a6
1 changed files with 1 additions and 1 deletions
|
@ -117,7 +117,7 @@ module ActiveModel
|
|||
# user.authenticate_password('notright') # => false
|
||||
# user.authenticate_password('mUc3m00RsqyRe') # => user
|
||||
define_method("authenticate_#{attribute}") do |unencrypted_password|
|
||||
attribute_digest = send("#{attribute}_digest")
|
||||
attribute_digest = public_send("#{attribute}_digest")
|
||||
BCrypt::Password.new(attribute_digest).is_password?(unencrypted_password) && self
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue