Active Login with Double Entry in Devise Rails

I have a Rails application that is already configured to use devise with User . I just add ActiveAdmin and use a separate AdminUser model AdminUser . This new model also uses the device. I have a problem:

When I go to localhost:3000/admin - the administrator login page, the application first directs me to localhost:3000/users/sign_in - the general user login page. In other words, in order to go to the admin page, I have to log in twice.

Is there any way to fix this?

+4
source share
1 answer

I tried adding this to config/initializer/active_admin.rb :

 config.skip_before_filter :authenticate_user! 

And it works.

+2
source

All Articles