diff options
author | Paul Barry <mail@paulbarry.com> | 2010-06-25 22:01:56 -0400 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-06-26 12:02:24 +0200 |
commit | 59b24ceb0c558715714e272737ca0ca06f6043d5 (patch) | |
tree | c92d8a099d328d1af1afbdaa388b4740ce270c68 /actionpack/lib | |
parent | 7bd85a8fc2d216a5e2b1d0380df572f782a54d1c (diff) | |
download | rails-59b24ceb0c558715714e272737ca0ca06f6043d5.tar.gz rails-59b24ceb0c558715714e272737ca0ca06f6043d5.tar.bz2 rails-59b24ceb0c558715714e272737ca0ca06f6043d5.zip |
Fixed normalize_path in Routing::Mapper to handle optional prefix segments with static and dynamic parts
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'actionpack/lib')
-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 0d22716ba7..ca57c302ef 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -194,7 +194,7 @@ module ActionDispatch # for root cases, where the latter is the correct one. def self.normalize_path(path) path = Rack::Mount::Utils.normalize_path(path) - path.sub!(%r{/(\(+)/?:}, '\1/:') unless path =~ %r{^/\(+:.*\)$} + path.sub!(%r{/(\(+)/?([^:]*):}, '\1/\2:') unless path =~ %r{^/\(+:.*\)$} path end |