blob: 5778b22f1852ce848d77881ae86a7bd66c649eb0 (
plain) (
blame)
1
2
3
4
5
6
7
|
desc 'Print out all defined routes in match order, with names. Target specific controller with CONTROLLER=x.'
task :routes => :environment do
all_routes = Rails.application.routes.routes
require 'rails/application/route_inspector'
inspector = Rails::Application::RouteInspector.new
puts inspector.format(all_routes, ENV['CONTROLLER']).join "\n"
end
|