Skip to content

Instantly share code, notes, and snippets.

@drymar
Created May 7, 2020 13:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drymar/04010ee6e052c071592c9d206ad853ac to your computer and use it in GitHub Desktop.
Save drymar/04010ee6e052c071592c9d206ad853ac to your computer and use it in GitHub Desktop.
# .pryrc
require 'rails/application/route_inspector'
def display_routes
Rails.application.reload_routes!
routes = Rails.application.routes.routes
inspector = Rails::Application::RouteInspector.new
puts inspector.format(routes, ENV['CONTROLLER']).join("\n")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment