Forum: Ruby on Rails how to refactor "/blog/2004/12/25" to REST?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
F5f6d5ab66fc3cab774af20336c66566?d=identicon&s=25 kaven (Guest)
on 2007-04-25 19:41
(Received via mailing list)
Hi all,
how to refactor "/blog/2004/12/25" to REST?
"/blogs;search?q=2004-12-25" isn't more meansful than original.
How should I do if I want to use full Resource-Based Routing?
And is it good  for refactoring all to REST.
F5d61a3c93217e393cfdf7bf5c7ac628?d=identicon&s=25 Michael D. Ivey (Guest)
on 2007-04-25 20:05
(Received via mailing list)
> how to refactor "/blog/2004/12/25" to REST?
> "/blogs;search?q=2004-12-25" isn't more meansful than original.

/blog/2004/12/25 is a pretty RESTful URL.  Just because it doesn't
match the Rails default of /resources/id doesn't make it non-RESTful.

I would tend towards "/posts/:year/:month/:day/:slug" where slug has
the id as well, but your current one is fine.
This topic is locked and can not be replied to.