开发者

Rails: Duplicate route tree; is there a better way?

In my rails application I have two trees that are identical but mounted in two points:

resources :organizations do

  large_routing_tree

  resources :projects do
    large_routing_tree
  end
end

The large_routing_tree includes around 10 resources with nesting.

Is there a better way to do this than co开发者_StackOverflow社区py-pasting the routes?


I mean

resources :organizations do 
  resources :projects, :shallow => true do
    large_routing_tree
  end
end
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜