Module: Clearance::Model::ClassMethods
- Defined in:
- lib/clearance/app/models/model.rb
Instance Method Summary collapse
Instance Method Details
#authenticate(email, password) ⇒ Object
28 29 30 31 |
# File 'lib/clearance/app/models/model.rb', line 28 def authenticate(email, password) user = find_by_email email user && user.authenticated?(password) ? user : nil end |