From 996092ec18ac3ad9e0c573da73325fdc34aefac0 Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Sun, 24 Apr 2016 13:40:58 +0900 Subject: register rake options to `OptionParser` In order to prevent `OptionParser::ParseError` when specify the rake options to `routes` task. --- railties/lib/rails/tasks/routes.rake | 3 +++ 1 file changed, 3 insertions(+) (limited to 'railties/lib/rails/tasks') diff --git a/railties/lib/rails/tasks/routes.rake b/railties/lib/rails/tasks/routes.rake index 69103aa5d9..ff7233cae9 100644 --- a/railties/lib/rails/tasks/routes.rake +++ b/railties/lib/rails/tasks/routes.rake @@ -19,6 +19,9 @@ task routes: :environment do OptionParser.new do |opts| opts.banner = "Usage: rails routes [options]" + + Rake.application.standard_rake_options.each { |args| opts.on(*args) } + opts.on("-c CONTROLLER") do |controller| routes_filter = { controller: controller } end -- cgit v1.2.3