我知道这个问题在Rails中出现了很多,但我似乎无法获得任何以前的答案.
MyApplication::Application.routes.draw do resources :matters do resources :issues end
No route matches {:action=>"show",:controller=>"issues",:matter_id=>#<Matter id: 2,name: "Wilson",user_id: nil,created_at: "2011-03-23 18:19:40",updated_at: "2011-03-23 18:19:40">,:id=>nil}
我想尝试这样的道路:@H_502_5@
<%= link_to issue.content,matter_issue_path(@matter,@issue) %>
matter_issues GET /matters/:matter_id/issues(.:format) {:action=>"index",:controller=>"issues"}
解决方法
尝试matter_issues_path(@matter,@issue)
我似乎总是遇到使用Rails路由的这些复数陷阱.@H_502_5@