Module: Hydra::User::ClassMethods
- Defined in:
- lib/hydra/user.rb
Instance Method Summary collapse
-
#find_by_user_key(key) ⇒ Object
This method finds User objects using the user_key as specified by the Devise authentication_keys configuration variable.
Instance Method Details
#find_by_user_key(key) ⇒ Object
This method finds User objects using the user_key as specified by the Devise authentication_keys configuration variable. This method encapsulates whether we use email or username (or something else) as the identifing user attribute.
21 22 23 |
# File 'lib/hydra/user.rb', line 21 def find_by_user_key(key) find_by(Hydra.config.user_key_field => key) end |