diff options
author | Yoshiyuki Kinjo <yskkin@gmail.com> | 2018-08-15 09:50:25 +0900 |
---|---|---|
committer | Yoshiyuki Kinjo <yskkin@gmail.com> | 2018-08-20 19:17:40 +0900 |
commit | e2d0b3b375049546b23fdd33147155cdcc6b032e (patch) | |
tree | a045eb019c42560138d205284647d21fc5a314e4 /actionpack/lib/action_dispatch | |
parent | 103b02f1524beaa5c773f95dce6892dad3805d4f (diff) | |
download | rails-e2d0b3b375049546b23fdd33147155cdcc6b032e.tar.gz rails-e2d0b3b375049546b23fdd33147155cdcc6b032e.tar.bz2 rails-e2d0b3b375049546b23fdd33147155cdcc6b032e.zip |
Fix `rails routes -c` for controller name consists of multiple word.
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/inspector.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/routing/inspector.rb b/actionpack/lib/action_dispatch/routing/inspector.rb index cba49d1a0b..413e524ef6 100644 --- a/actionpack/lib/action_dispatch/routing/inspector.rb +++ b/actionpack/lib/action_dispatch/routing/inspector.rb @@ -83,7 +83,7 @@ module ActionDispatch private def normalize_filter(filter) if filter[:controller] - { controller: /#{filter[:controller].downcase.sub(/_?controller\z/, '').sub('::', '/')}/ } + { controller: /#{filter[:controller].underscore.sub(/_?controller\z/, "")}/ } elsif filter[:grep] { controller: /#{filter[:grep]}/, action: /#{filter[:grep]}/, verb: /#{filter[:grep]}/, name: /#{filter[:grep]}/, path: /#{filter[:grep]}/ } |