aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2018-03-13 20:09:30 +0100
committerGitHub <noreply@github.com>2018-03-13 20:09:30 +0100
commitbebce8c1a07c1b0628d3568d56ccc1e7bb1943a7 (patch)
tree6cc0d10c87fd04484eca7ecc8c2f7065f8cdf661 /railties
parent48a7174fcff462568354184b7e7e86db5aa0b495 (diff)
parent304906f1bd4cd6f2831b6ae39a9ae54599d85569 (diff)
downloadrails-bebce8c1a07c1b0628d3568d56ccc1e7bb1943a7.tar.gz
rails-bebce8c1a07c1b0628d3568d56ccc1e7bb1943a7.tar.bz2
rails-bebce8c1a07c1b0628d3568d56ccc1e7bb1943a7.zip
Merge pull request #32153 from bogdanvlviv/rails-routes-32130
Change message on the empty result of searching routes by `rails routes` with `-c` or `-g`
Diffstat (limited to 'railties')
-rw-r--r--railties/lib/rails/commands/routes/routes_command.rb8
1 files changed, 1 insertions, 7 deletions
diff --git a/railties/lib/rails/commands/routes/routes_command.rb b/railties/lib/rails/commands/routes/routes_command.rb
index c4f3717095..25ee65aeaa 100644
--- a/railties/lib/rails/commands/routes/routes_command.rb
+++ b/railties/lib/rails/commands/routes/routes_command.rb
@@ -36,13 +36,7 @@ module Rails
private
def routes_filter
- if options.has_key?("controller")
- { controller: options["controller"] }
- elsif options.has_key?("grep_pattern")
- options["grep_pattern"]
- else
- nil
- end
+ options.symbolize_keys.slice(:controller, :grep_pattern)
end
end
end