路线:
resources :projects do
member do
resources :stakeholders
end
end
由此产生的路线是:
projects_stakeholders GET /projects/projects/:id/stakeholders(.:format) {:action=>"index", :controller=>"projects/stakeholders"}
POST /projects/projects/:id/stakeholders(.:format) {:action=>"create", :controller=>"projects/stakeholders"}
new_projects_stakeholder GET /projects/projects/:id/stakeholders/new(.:format) {:action=>"new", :controller=>"projects/stakeholders"}
edit_projects_stakeholder GET /projects/projects/:id/stakeholders/:id/edit(.:format) {:action=>"edit", :controller=>"projects/stakeholders"}
projects_stakeholder GET /projects/projects/:id/stakeholders/:id(.:format) {:action=>"show", :controller=>"projects/stakeholders"}
由于这些路线有两倍:直径,如果我有“URL”项目,则会影响到利益攸关方/11。
在我的记录档案中,我看到:
Parameters: {"id"=>"11"}
那么,我如何能够从我的控制者内部获得我的项目。
Thanks!!!