mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
9c4afcf4cd
Follow the consistency defined in dbc43bc
.
7 lines
363 B
Ruby
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
|