Hello,
Well I am working on an app and wanted to make some changes on the
URL’s. I have the following:
#—
map.resources :groups do |groups|
groups.resources :events, :member => { :invite => :get }
end
#—
So my events are mapping into:
#—
#—
What I want to do now is take out the ‘group’ from there and only
leave the id. Make it look like this:
#—
#—
I tried something like the following and now I have an events_path
route that works.
#—
map.events ‘:group_id/events’, :controller => ‘events’, :action =>
‘index’
#—
My question is: Should I then repeat this same line 5 times to map all
the other actions? That without counting the member actions?
map.events_new …
map.events_create…
…
…
It just seems wrong and tedious. It’s there any other way to do this?
Thanks for your attention,
Elías