For several projects I need something to simplify my routes to remove the controller name for one of the most important routes. In this case editions, so instead of
domain.com/editions/london/venues/the-venue
We use ->
domain.com/london/venues/the-venue
I've been using this formula for my routing:
# MUST BE LAST
resources :editions, path: '' do
get 'set_session', on: :member
resources :events
resources :quiz_masters
resources :venues
end
And it works fine, but I feel there's something unpleasant about it. I'm wondering if there's a better alternative, one which also has constraints, so I don't have to worry about sticking it always at the bottom of my routes.
I'm also not sure path: ''
is a good way to do it? Even though it works.