How Would you Mimic an Arbitrary Directory Structure with Rails Routes?
- by viatropos
I want to be able to map Google Docs' folder system to urls in my application and am just wondering how I can say "route, I want you to match an arbitrary set of nodes, and the last one is the file (or possibly a directory, I can check in the controller)".
So I could do things like:
www.mysite.com/documents/folder1/childfolderA/document
www.mysite.com/documents/root-level-doc
Can the routes.rb file do something like this?