I have one Devise model: User. I am needing two different login views, /login and /admin/login. Also, there would need to be two logout actions that redirect to different places (/logout and /admin/logout). Is this possible? Any pointers?
Thanks!
you can add all the views and controllers of devise to your project.
rails generate devise:viewsThis adds a devise folder inside your app/views. Inside the session/new view you can modify the loginform based on the route used. The same can be done for the destroying of sessions by overriding the controllers.However, there might be something wrong in your logic if you need multiple routes to login and logout. If you simply need to elevate people to admin level or allow access to a admin like rails_admin there are plenty alternatives. You could for example have a look at CanCan and implement RBAC into your application.