Answer the question
In order to leave comments, you need to log in
Rails Devise+Cancan how to redirect a specific user role to a specific namespace?
Hello
There are 4 user roles. I make a separate namespace for each role.
Tell me where in the application and how, after determining the user's role, redirect him to a specific namespace. Moreover, it is desirable that the namespace is not reflected in the address bar in any way.
Those. Ideally, after authorization, the user opens, for example, the root_path is already his namespace. And in the address line there is nothing like server.name/namespace , but just server.name Is it possible to do this? Or does the definition of namespace always come from the address bar?
Answer the question
In order to leave comments, you need to log in
I somehow popped up in production such a thing.
Suppose there are 2 routes:
get '/home' => ''
get '/:id' => ''
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question