0
从例如Rails3中嵌套的路线,路线,如:与轨道导轨默认基
resources :publishers do
resources :magazines do
resources :photos
end
end
会导致,网址,如:
/publishers/1/magazines/2/photos/3
我想有出版商例如蛞蝓 - 牛津 ,避免了第一个“/出版商”部分 使网址类似:
/oxford/1/magazines/2/photos/3
在Rails 3中实现这一点最干净和最好的方法是什么?
我已经使用友好的ID ..看到整个railscast,有与我的问题没有任何关系! – whizcreed