开发者

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

开发者 https://www.devze.com 2023-04-11 12:21 出处:网络
In my rails application I have two trees that are identical but mounted in two points: resources :organizations do

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

精彩评论

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

关注公众号