From d4e1a2ef0d35f322803284a980575fc31ff7b4b6 Mon Sep 17 00:00:00 2001 From: Andrew White Date: Sat, 26 Jun 2010 10:46:24 +0100 Subject: Support optional static segements as well [#4832 state:resolved] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Valim --- actionpack/lib/action_dispatch/routing/mapper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index ca57c302ef..388f695187 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/\2:') unless path =~ %r{^/\(+:.*\)$} + path.gsub!(%r{/(\(+)/?}, '\1/') unless path =~ %r{^/\(+[^/]+\)$} path end -- cgit v1.2.3