quo_vadis
quo_vadis copied to clipboard
Use known-name routes because redirection targets can conflict with actual names
Currently the way to configure where QuoVadis redirects the user after, e.g., logging in is to specify a route with the name :after_login
:
get '/dashboard', to: 'dashboards#show', as: :after_login
But that means if you want to give the route its "own" name, :dashboard
, you need to duplicate the routes:
get '/dashboard', to: 'dashboards#show', as: :dashboard
get '/dashboard', to: 'dashboards#show', as: :after_login
This is a little inelegant.