Module: Trestle::Auth::ModelMethods::ClassMethods
- Defined in:
- lib/trestle/auth/model_methods.rb
Instance Method Summary collapse
Instance Method Details
#authenticate(identifier, password) ⇒ Object
13 14 15 16 |
# File 'lib/trestle/auth/model_methods.rb', line 13 def authenticate(identifier, password) user = find_by(Trestle.config.auth.authenticate_with => identifier) || NullUser.new user if user.authenticate(password) end |