My routes:
resources :events, :path_names => { :new => "organize" } do
resources :forums
end
With these routes, I'll get urls like /events/:event_id/forums/organize
. I don't want the path_names to propagate to my nested routes... Do I have to redefine path_names
for them? Or use scope
?
resources :events, :path_names => { :new => "organize" } do
scope :path_names => { :new => "new" } do
resources :forums
# other nested resources...
end
end
Or (my favorite, until you find a better solution ;))
resources :events, :path_names => { :new => "organize" }
resources :events, :only => [] do
#nested resources...
end
Is there a more elegant way to do this? if you don't think so, you can also tell me which one is the best in your opinion.