From f9e2496872bcd34aa7c6083b1763322b47fba6a3 Mon Sep 17 00:00:00 2001 From: brainopia Date: Thu, 8 Jan 2015 02:53:57 +0300 Subject: Correct route requirements by overriding defaultls (fixes #18373) --- actionpack/lib/action_dispatch/journey/route.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_dispatch/journey/route.rb b/actionpack/lib/action_dispatch/journey/route.rb index 4d5c18984a..4698ff8cc7 100644 --- a/actionpack/lib/action_dispatch/journey/route.rb +++ b/actionpack/lib/action_dispatch/journey/route.rb @@ -36,7 +36,7 @@ module ActionDispatch def requirements # :nodoc: # needed for rails `rake routes` - path.requirements.merge(@defaults).delete_if { |_,v| + @defaults.merge(path.requirements).delete_if { |_,v| /.+?/ == v } end -- cgit v1.2.3