routes.rb
Rails.application.routes.draw do
root to: 'visitors#index'
resources :states do
resources :cities do
get 'listings'
end
end
end
我希望设置我的 GET URL 如下所示:../state.id/city.id/listings.id
我正在使用 friendly_id
,因此URL将会像这样:
../OR/Portland/2011-ford-truck