Module: Revise::Models::DatabaseAuthenticatable::ClassMethods

Defined in:
lib/revise/models/database_authenticatable.rb

Instance Method Summary collapse

Instance Method Details

#authenticate(email, password) ⇒ Object



95
96
97
98
99
100
101
102
103
# File 'lib/revise/models/database_authenticatable.rb', line 95

def authenticate(email, password)
   = Account.find_by_email(email)
  return false unless 
  if .valid_password?(password)
    return 
  else
    return false
  end
end