Module: Amalgam::Authorities::Model::ClassMethods
- Defined in:
- lib/amalgam/authorities/model.rb
Instance Method Summary collapse
-
#authenticate(conditions, password) ⇒ Model
Authenticate a user with the given key and password.
-
#locate(key) ⇒ Model
abstract
Locate an model given its unique login key.
Instance Method Details
#authenticate(conditions, password) ⇒ Model
Authenticate a user with the given key and password.
19 20 21 22 23 |
# File 'lib/amalgam/authorities/model.rb', line 19 def authenticate(conditions, password) instance = locate(conditions) return false unless instance instance.authenticate(password) end |
#locate(key) ⇒ Model
This method is abstract.
Locate an model given its unique login key.
10 11 12 |
# File 'lib/amalgam/authorities/model.rb', line 10 def locate(key) raise NotImplementedError end |