diff options
author | Yves Senn <yves.senn@gmail.com> | 2012-11-04 14:59:15 +0100 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2012-11-08 21:26:26 +0100 |
commit | d12e75340996f174649ed584b062f46aa030e0dd (patch) | |
tree | 8eec91871e56416f7d7c7bdec3644f9c5cddbc0e /actionpack/lib/action_dispatch/routing/mapper.rb | |
parent | 70f384e0196fd4f8bcb7dea05af8611df4578563 (diff) | |
download | rails-d12e75340996f174649ed584b062f46aa030e0dd.tar.gz rails-d12e75340996f174649ed584b062f46aa030e0dd.tar.bz2 rails-d12e75340996f174649ed584b062f46aa030e0dd.zip |
backport, handle trailing slash with engines
this is a backport of #8115 to fix #7842
Diffstat (limited to 'actionpack/lib/action_dispatch/routing/mapper.rb')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 952219631a..9a474d2e3a 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -451,7 +451,7 @@ module ActionDispatch # we must actually delete prefix segment keys to avoid passing them to next url_for _route.segment_keys.each { |k| options.delete(k) } prefix = _routes.url_helpers.send("#{name}_path", prefix_options) - prefix = '' if prefix == '/' + prefix = prefix.gsub(%r{/\z}, '') prefix end end |