Login Help [Ruby On Rails - Gem Devise]

0

I'm using Gem Devise to create a login system. However, my project requires 2 login verification fields instead of just 1. For example, the company has 5 departments, the user has the code 0010 and works in department 1, so for his login he would need to enter the name of his department and his code (besides, of course, his password). How do I implement 2 login verification fields? I copied the code field on the devise pages, but I heard that I needed to tinker with the controller as well. Does it proceed? How do I change the controller to meet this request?

    
asked by anonymous 17.08.2017 / 13:48

1 answer

2

To generate the controller and change it according to what you need, you need to run this command:

  

Create your custom controllers using the generator which requires a scope:

     

$ rails generate devise: controllers [scope]

If you'd like to take a look at the documentation: Devise

Look for the Configuring controllers tag if you'd like more information.

    
17.08.2017 / 13:52