2015-10-07 86 views
1

路由使零意義對我來說,有一個簡單的方法來轉換這樣的:Rails2到Rails3中路由轉換

#map.resources :bicycles, :controller => 'store/bicycles', :path_prefix => 'store' 

在此先感謝

回答

1

controller選項也可Rails 3可用,並且path_prefix可以用scope實現。下面是該路由的給導軌3

scope 'store' do 
    resources :bicycles, :controller => 'store/bicycles' 
end 
+0

燁的轉換,這是它。謝謝! – gypsyDev