module Devise::Models::DatabaseAuthenticatable

def password_digest(password)

Digests the password using bcrypt.
def password_digest(password)
  ::BCrypt::Password.create("#{password}#{self.class.pepper}", :cost => self.class.stretches).to_s
end