Imagine that you decide to add a new user registration field. Let it be the name field After adding a field to the View You must add information about the new field to the controller. You can add it to the application_controller.rb file, but this is not the best solution. Imagine that your application will become very large. Imagine what your controller will look like. To get rid of this problem, I use modules

1 Step. Create module in foulder controllers/concerns. Create file, let’s say devise_whitelist.rb

2 Step. Include module to main controller application_controller.rb

 

Leave a Reply