I have a User Model with encryption using brcypt gem.
However, when I am using the following code it is returning false as result.
User.find(117).try(:authenticate ,User.find(117).password_digest)
But below mentioned command works fine:
User.find(117).try(:authenticate ,"password")
It returns true.
So how can I achieve the first conditions when I need to validate the password already stored in the database.
Any help would be appreciated!!