diff options
author | Vipul A M <vipulnsward@gmail.com> | 2016-02-11 17:06:03 +0530 |
---|---|---|
committer | Vipul A M <vipulnsward@gmail.com> | 2016-02-12 14:35:57 +0530 |
commit | ef2a8c23911c35272da139a47e05a15ebf292334 (patch) | |
tree | 1fc7399ed1207041c621c7474697bc279fdf0121 /railties/lib/rails/tasks | |
parent | 33257d15ad5239260747fcefc8528efe21fbe02b (diff) | |
download | rails-ef2a8c23911c35272da139a47e05a15ebf292334.tar.gz rails-ef2a8c23911c35272da139a47e05a15ebf292334.tar.bz2 rails-ef2a8c23911c35272da139a47e05a15ebf292334.zip |
- Fixed and removed long arguments to rake routes
- Fixed related documentation and usage all around
Fixes #23561
Diffstat (limited to 'railties/lib/rails/tasks')
-rw-r--r-- | railties/lib/rails/tasks/routes.rake | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/railties/lib/rails/tasks/routes.rake b/railties/lib/rails/tasks/routes.rake index 939fa59c75..69103aa5d9 100644 --- a/railties/lib/rails/tasks/routes.rake +++ b/railties/lib/rails/tasks/routes.rake @@ -2,7 +2,7 @@ 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 --controller option - or its -c shorthand.' +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' @@ -19,11 +19,11 @@ task routes: :environment do OptionParser.new do |opts| opts.banner = "Usage: rails routes [options]" - opts.on("-c", "--controller [CONTROLLER]") do |controller| + opts.on("-c CONTROLLER") do |controller| routes_filter = { controller: controller } end - opts.on("-g", "--grep [PATTERN]") do |pattern| + opts.on("-g PATTERN") do |pattern| routes_filter = pattern end |