can I get all routes in my rails application? I need an output like rake routes and put the result in an array.
rake routes
Is it possible? how?
Well, independently of where you need it, you could do:
routes = `rake routes`.split("\n")
Or even:
routes = `rake routes`.split("\n").map{ |r| r.gsub(', ', ',').split(' ') }