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

On Apr 16, 10:00 pm, Dave [email protected] wrote:

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs