I use a program to authenticate my users in a Rails 4.1.9 application.
I need to list all the routes being developed in a javascript file.
I tried to do something like this:
all_routes = Rails.application.routes.routes.map do |route|
route.path.spec.to_s.gsub('(.:format)', '')
end
It just prints all the rail routes. How can I only come up with?
I tried to check the controllers, but I do not know how to do this ...
Progm source
share