I'm creating a Rails app and I'm trying to do not use Devise to handle my registrations & sessions related to my User
model but I'm running into an issue.
I'd like to have specific routes like that:
- http://localhost:3000/users/registrations/new
- http://localhost:3000/users/sessions/new
I tried several solution but none is working, last try was those lines of code:
get "users/registrations/new", to: "registrations#new", controller: "users/registrations", as: :new_registration
get "users/sessions/new", to: "sessions#new", controller: "users/sessions", as: :new_session
But I got the following error: uninitialized constant RegistrationsController
My registrations_controller
and my sessions_controller
are in the following path: app/controllers/users/
Is anyone knows how I could handle that? Should I use resources
or a namespace
? I already tried those solutions but I'm facing the same issue all the time...
Thank you for your help!