How to declare a member for a restful resource when it has a nested resource


Currently my routes.rb looks like this.

map.resources :cities do |cities|
cities.resources :venues, :collection => {:transfer => :any}

Now I have a need to declare something like

map.resources :cities, :collection => {:manage => :get}

But since I have a nested resource for cities I am not sure what the
syntax is to declare a collection on cities?

Thanks in advance.


The collection and other options are just a hash being passed as
parameters to the resources method. The ruby language defines all
parameters before blocks in method calls. Try the following:

map.resources :cities, :collection => {:manage => :get} do |cities|
cities.resources :venues, :collection => {:transfer => :any}