How can I get the list of routes programatically in a rails 2 project. In a Rails 3 project,
Rails.application.routes.routes did what I wanted. But when I try this on a Rails 2 web site. It fails with the message
No application method defined on Rails object.
you can look at the code for rake routes tasks most probably under
/gems/rails/2.3.x/lib/tasks/routes.rake for Rails 2. ActionController::Routing::Routes.routes
look at the rake task in more detail to get a better Idea