How to add additional rest routes to a nested resource in rails -
i have widget has many links. in routes file:
map.resources :widgets, :has_many => [:links]
i want add "sort" action links. need add routes file, can write sort_widget_links_path(widget)
you can define using block:
map.resources :widgets |widget| widget.resources :links, :member => {:sort => :get} end
Comments
Post a Comment