3
我有嵌套用于不同的下拉列表中JSON REST应用路线的组合和分组DRY在ROR路线描述
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
有没有办法来形容它更干路?
现在看起来更好一点...谢谢 – Fivell 2012-02-02 14:47:29