I've got a blogs_controller with a Blog resource, so I've got your typical routes right now as follows:
/blogs/new
/blogs/1
/blogs/1/edit #etc
But here's what I want:
/blogs/new
/blogs/2010/01/08/1-to_param-or-something
/blogs/2010/01/08/1-to_param-or-something/edit #etc
...
/blogs/2010/01 # all posts for January 2010, but how to specify custom action?
I know that I can do this with a combination of map.resources and map.connect, but I've got a lot of views that link to other pages via "new_blog_path" etc and I don't want to have to go and edit those. Is this possible with map.resources alone? It might not be easy, but I'm not against being clever. I was thinking of something like:
map.resources :blogs, :path_prefix => ':year/:month/:day', :requirements => {:year => /\d{4}/, :month => /\d{1,2}/, :day => /\d{1,2}/}
But I'm not sure how that works with actions like 'new' or 'create', and it also gives me a route like /2010/01/08/blogs/1-to_param-etc
with blogs in the middle of the URL.
So, is there a clever solution that I'm missing, or do I need to go the map.connect route?