Ruby knock gem integration with devise user model Ruby knock gem integration with devise user model curl curl

Ruby knock gem integration with devise user model


After investigating following link:

http://api.rubyonrails.org/classes/ActiveModel/SecurePassword/ClassMethods.html#method-i-has_secure_password

this is important piece of information:

Adds methods to set and authenticate against a BCrypt password. This mechanism requires you to have a password_digest attribute.

Since devise uses in user model method:

encrypted_password

you need in User active model create following method:

def password_digest    self.encrypted_passwordend