Module: Devise::Models::DatabaseAuthenticatable::ClassMethods
- Defined in:
- lib/devise/models/database_authenticatable.rb
Instance Method Summary collapse
-
#encryptor_class ⇒ Object
Returns the class for the configured encryptor.
-
#find_for_database_authentication(conditions) ⇒ Object
We assume this method already gets the sanitized values from the DatabaseAuthenticatable strategy.
- #password_salt ⇒ Object
Instance Method Details
#encryptor_class ⇒ Object
Returns the class for the configured encryptor.
94 95 96 |
# File 'lib/devise/models/database_authenticatable.rb', line 94 def encryptor_class @encryptor_class ||= ::Devise::Encryptors.const_get(encryptor.to_s.classify) end |
#find_for_database_authentication(conditions) ⇒ Object
We assume this method already gets the sanitized values from the DatabaseAuthenticatable strategy. If you are using this method on your own, be sure to sanitize the conditions hash to only include the proper fields.
106 107 108 |
# File 'lib/devise/models/database_authenticatable.rb', line 106 def find_for_database_authentication(conditions) find_for_authentication(conditions) end |
#password_salt ⇒ Object
98 99 100 |
# File 'lib/devise/models/database_authenticatable.rb', line 98 def password_salt self.encryptor_class.salt(self.stretches) end |