Methods
A
P
Instance Public methods
authenticate(unencrypted_password)

Returns self if the password is correct, otherwise false.

    # File activemodel/lib/active_model/secure_password.rb, line 57
57:       def authenticate(unencrypted_password)
58:         if BCrypt::Password.new(password_digest) == unencrypted_password
59:           self
60:         else
61:           false
62:         end
63:       end
password=(unencrypted_password)

Encrypts the password into the password_digest attribute.

    # File activemodel/lib/active_model/secure_password.rb, line 66
66:       def password=(unencrypted_password)
67:         @password = unencrypted_password
68:         unless unencrypted_password.blank?
69:           self.password_digest = BCrypt::Password.create(unencrypted_password)
70:         end
71:       end