diff options
author | xithan <philipp.kuehl@gmail.com> | 2019-04-15 13:21:02 +0200 |
---|---|---|
committer | xithan <philipp.kuehl@gmail.com> | 2019-04-15 15:11:13 +0200 |
commit | 64ed91f5aad74cdfa93dc08c2f5899a8e0555f4c (patch) | |
tree | a2d395acdebaf7c24d0e066498dd20f9c6b6c3bb /actionpack/lib/action_dispatch/journey/path | |
parent | a8328f61b6b958140738d5c31438132b20089c93 (diff) | |
download | rails-64ed91f5aad74cdfa93dc08c2f5899a8e0555f4c.tar.gz rails-64ed91f5aad74cdfa93dc08c2f5899a8e0555f4c.tar.bz2 rails-64ed91f5aad74cdfa93dc08c2f5899a8e0555f4c.zip |
mounted routes with non-word characters
Diffstat (limited to 'actionpack/lib/action_dispatch/journey/path')
-rw-r--r-- | actionpack/lib/action_dispatch/journey/path/pattern.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/journey/path/pattern.rb b/actionpack/lib/action_dispatch/journey/path/pattern.rb index 697f5b9d8b..25ecb37dc8 100644 --- a/actionpack/lib/action_dispatch/journey/path/pattern.rb +++ b/actionpack/lib/action_dispatch/journey/path/pattern.rb @@ -119,7 +119,8 @@ module ActionDispatch class UnanchoredRegexp < AnchoredRegexp # :nodoc: def accept(node) - %r{\A#{visit node}(?:\b|\Z)} + path = visit node + path == "/" ? %r{\A/} : %r{\A#{path}(?:\b|\Z|/)} end end |