开发者

How to route to a nested resource whilst not routing to the outer parent resource?

Giv开发者_JAVA技巧en the following code:

resources :subjects do
  resources :partipicants
end

I want to route /subjects/x/partipicants etc

But I do not want to route /subjects etc. (i.e. the regular outer resource).

Anyone know how to pull this off cleanly?

Jack


You can try this:

resources :subjects, :only => [] do
  resources :partipicants
end
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜