include ActionController::Routing

Hi there,

I was wondering how I would gain access to all the named routes available to an application from within a rake task. I tried to "include ActionController::Routing" within the rake task, but that doesn't seem to work because when I specify one of my named routes in the rake task I get an error of "undefined local variable or method 'the_url' for main:Object".

What else do I have to "include"?

Thank you, Dave

I don't actually know, but there is a rails supplied take task that lists all those routes, so I'd suggest that you poke around in the source for that task to begin with (it's somewhere in railties I think).

Fred