I have an application that uses multiple user models, each with its own devise configuration and its own model. For my setup, this made more sense than just using a single user model and roles, and I am happy with how it has all turned out.
However, I am having some issues with devise’s defaults and how to override them per model. For things like unlock_strategy or the time the user has to log in after requesting a password reset , devise looks to the file config/initializers/devise.rb. How do I set those variables on a per model basis?
The
#devisemethod in your model accepts a hash of configuration options after the list of modules. Something like: