I have a widget that has many links. In the routes file:
map.resources :widgets, :has_many => [:links]
I want to add a "sort" action to links. What do I need to add to the routes file, so I can write sort_widget_links_path(widget)
Thanks,
Deb
I have a widget that has many links. In the routes file:
map.resources :widgets, :has_many => [:links]
I want to add a "sort" action to links. What do I need to add to the routes file, so I can write sort_widget_links_path(widget)
Thanks,
Deb
You can define it using a block:
map.resources :widgets do |widget|
widget.resources :links, :member => {:sort => :get}
end