hi, I am using: map.resources
:users, has_many => 'events'
to route a new app I am working on. Problem is that now, i can view
the index action for my events controller at both:
I of course prefer the second of the two but am a bit worried about
where i might have went wrong to end up with the duplicates...
The 'localhost:3000/events' is being provided by 'map.resources :events'. If you delete that one line then that will won't work anymore but you'll still have the other. However, that means that you also won't be able to go to 'localhost:3000/events/42', but would instead need to go to 'localhost:3000:/users/6/events/42'.
My recommendation would be to not worry about the duplicates. If you don't ever link to 'localhost:3000/events' then it won't get hit much, and it wouldn't be hard to write a little code to redirect to someplace appropriate if a params[:user_id] isn't set in the index action.