aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/tasks/routes.rake
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/tasks/routes.rake')
-rw-r--r--railties/lib/rails/tasks/routes.rake14
1 files changed, 7 insertions, 7 deletions
diff --git a/railties/lib/rails/tasks/routes.rake b/railties/lib/rails/tasks/routes.rake
index ff7233cae9..f5e5b9ae87 100644
--- a/railties/lib/rails/tasks/routes.rake
+++ b/railties/lib/rails/tasks/routes.rake
@@ -1,13 +1,13 @@
-require 'active_support/deprecation'
-require 'active_support/core_ext/string/strip' # for strip_heredoc
-require 'optparse'
+require "active_support/deprecation"
+require "active_support/core_ext/string/strip" # for strip_heredoc
+require "optparse"
-desc 'Print out all defined routes in match order, with names. Target specific controller with -c option, or grep routes using -g option'
+desc "Print out all defined routes in match order, with names. Target specific controller with -c option, or grep routes using -g option"
task routes: :environment do
all_routes = Rails.application.routes.routes
- require 'action_dispatch/routing/inspector'
+ require "action_dispatch/routing/inspector"
inspector = ActionDispatch::Routing::RoutesInspector.new(all_routes)
- if ARGV.any?{ |argv| argv.start_with? 'CONTROLLER' }
+ if ARGV.any? { |argv| argv.start_with? "CONTROLLER" }
puts <<-eow.strip_heredoc
Passing `CONTROLLER` to `bin/rails routes` is deprecated and will be removed in Rails 5.1.
Please use `bin/rails routes -c controller_name` instead.
@@ -15,7 +15,7 @@ task routes: :environment do
end
routes_filter = nil
- routes_filter = { controller: ENV['CONTROLLER'] } if ENV['CONTROLLER']
+ routes_filter = { controller: ENV["CONTROLLER"] } if ENV["CONTROLLER"]
OptionParser.new do |opts|
opts.banner = "Usage: rails routes [options]"