BCrypt authentication always failing RAILS

I'm following Michael Hartl's Ruby on Rails Tutorial, where I reached Chapter 8. But the authenticated? method always returns false. The Cookie for :remember_token is saved properly. But as i compare the in the database digested remember_digest via

BCrypt::Password.new(remember_digest).is_password?(remember_token)

it will always return false. I'm using Rails 4.2.5.1. Here is my code: