Module: Devise::Models::PasswordHashable::ClassMethods
- Defined in:
- lib/devise/models/password_hashable.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#rehash_class ⇒ Object
Returns the class for the configured strategy.
Instance Method Details
#rehash_class ⇒ Object
Returns the class for the configured strategy. strategy
142 143 144 145 146 147 148 149 150 151 152 |
# File 'lib/devise/models/password_hashable.rb', line 142 def rehash_class @rehash_class ||= case hashing_strategy when nil raise("You need to specify a hashing_strategy: in Devise configuration to use :password_hashable") else Devise::Hashable::Strategy.const_get(hashing_strategy.to_s.classify) end rescue NameError raise("Configured password hashing_strategy '#{hashing_strategy.to_sym}' could not be found for :password_hashable") end |