How to specify a route member inside a block in Rails?
- by yuval
The following code:
map.resources :users, :has_many => :items
Could be written like this in a block:
map.resources :users do |user|
user.resources :items
end
How could I write the following code in a block?
map.resources :users, :member => { :start => :post }
Also, where could I find documentation on writing routes in blocks?
The Routes Documentation does not seem to show it.
Thank you!