Rails: How to route programatically
It is not obvious how to take a URL (or more specifically a path) and figure out what controller and parameters it routes to. Here is the answer:
ActionController::Routing::Routes.recognize_path("/test/where/does/this/go")
Found at this link:
http://www.rubynaut.net/articles/2008/04/06/rails-find-controller-for-a-path
(I need to move this thing from a blog to a wiki I think. These little notes function better as a wiki.)