Skip to content

Instantly share code, notes, and snippets.

@stephenrichards
Created March 21, 2018 13:59
Show Gist options
  • Save stephenrichards/23b6618be37bb53908cd5cb872a9cf2f to your computer and use it in GitHub Desktop.
Save stephenrichards/23b6618be37bb53908cd5cb872a9cf2f to your computer and use it in GitHub Desktop.
Llist all controllers and actions
Rails.application.routes.routes.each do |route|
d = route.defaults
next unless d.key?(:controller)
next if d[:internal] == true
puts "#{d[:controller]}/#{d[:action]}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment