2011-10-06 68 views
0

在我的Rails应用程序我有两棵树是相同的,但安装在两点:Rails:重复路由树;有没有更好的办法?

resources :organizations do 

    large_routing_tree 

    resources :projects do 
    large_routing_tree 
    end 
end 

的large_routing_tree包括约10资源筑巢。

有没有比复制粘贴路线更好的方法?

+0

哼。浅层路线? – fl00r

回答

1

我的意思是

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

这正是我所要求的,但它不适用于我,因为:项目还具有不应提供给组织的路线。 – gmalette

相关问题