Login Help [Ruby On Rails - Gem Devise]

Asked

Viewed 88 times

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 0010 code and works in department 1, so for his login he would need to enter his department name and his code (in addition, of course, to your access password). How do I implement 2 login verification fields? I copied the code field on the Devise pages, but I heard that you would need to touch the controller as well. Does this proceed? How I move the controller to fulfill this request?

1 answer

2

To generate the controller and change as needed, you need to run this command:

Create your custom controllers using the Generator which requires a Scope:

$ Rails generate Devise:controllers [Scope]

If you want to look at the documentation: Devise

Look for the tag Configuring controllers if you need more information.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.