Is it possible to have a different devise config for a specific model? I want to have the minimum password length for all user models set to 8 characters, But for Admin model I want to set it to 12 and for another model, say Student, I want to set it to 4. Is that possible?
I tried this:
devise :validatable
self.password_length = 4..128
inside my student.rb model, but it didn't seem to work!
I found the answer. No need to set self.password_length
. We can just do this:
devise :validatable, password_length: 8..128