Is there a way to make a table with a listing of all the controllers and actions similar to what you see in the rake routes?
Thanks!
Is there a way to make a table with a listing of all the controllers and actions similar to what you see in the rake routes?
Thanks!
there'a already a topic: How to programmatically list all controllers in Rails
one approach:
routes= Rails.application.routes.routes.map do |route|
{alias: route.name, path: route.path.spec.to_s, controller: route.defaults[:controller], action: route.defaults[:action]}
end