When you configure Devise, you say which model it works with (for example, with the user); many / most of its methods apply to this class. So, when you want to redefine the material.
Here is a comment from the Devise code in lib/devise/models/authenticatable.rb that describes almost what you want to do if I read correctly.
source share