Rails 3.2 friendly url routing by date

后端 未结 2 394
执念已碎
执念已碎 2021-01-01 03:06

I want to implement blog\\news application with ability to:

  1. show all posts at root: example.com/
  2. show all posts answering some year:
2条回答
  •  被撕碎了的回忆
    2021-01-01 03:53

    Is this your full routes.rb file? Sounds like you might have a preceding resources :posts entry, which basically matches /posts/:id. Also, there's nothing I can see from the routes file you posted that could be causing a redirect from the root path to posts, so it must be something else in there.

提交回复
热议问题