我在用于不同下拉列表和分组的 json rest 应用程序中嵌套了路由组合
resources :cities, :only =>[:index,:show]
resources :regions, :only =>[:index,:show] do
resources :cities, :only=>[:index, :show]
end
resources :countries, :only=>[:index,:show] do
resources :cities, :only=>[:index,:show]
resources :regions, :only=>[:index,:show]
end
有没有办法更干燥地描述它?