1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/railties/lib/rails/tasks/routes.rake
Carlos Antonio da Silva 9c4afcf4cd Rename RouteInspector to RoutesInspector
Follow the consistency defined in dbc43bc.
2012-07-08 13:49:15 -03:00

7 lines
363 B
Ruby

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 'action_dispatch/routing/inspector'
inspector = ActionDispatch::Routing::RoutesInspector.new
puts inspector.format(all_routes, ENV['CONTROLLER']).join "\n"
end