Devise sign_in path

Hi

How do I change my admins/sign_in path to /admin in devise?

My current routes file is this, there will be a user model also, which is why I am specifying the admins/sessions controller.

devise_for :admins, controllers: {sessions: 'admins/sessions'}

Thanks

Have you tried:

devise_for :admins, :path => '', :path_names => {:sign_in => 'admins'}

You can check it out on devise’s documentation.

Thanks guys, this is what I did to get it working:

  devise_for :admins, controllers: {sessions: 'admins/sessions'},
    path: '', path_names: {sign_in: 'admin'}
2 Likes