我的router.rb
resources :post_categories, :path => '', :only => [:show] do
resources :posts, :path => '', :only => [:show]
end
我得到了你需要的东西
/category/id
/category
如何获取此网址?
/category/2015/11/08/id
我想做这样的事情
resources :post_categories, path: '', only: :show do
resources :posts, path: '/:year/:month/:day', only: :show, constraints: { year: /\d{4}/, month: /\d{2}/, day: /\d{2}/ }
end
但我不明白如何让工人