From 61a31f3d3dae55b3ed2a49fafcbfe45b77ea3be2 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Tue, 1 Dec 2009 14:52:19 -0600 Subject: Fix generating params with optional defaults [#3404 state:resolved] --- actionpack/lib/action_dispatch/routing/deprecated_mapper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_dispatch/routing') diff --git a/actionpack/lib/action_dispatch/routing/deprecated_mapper.rb b/actionpack/lib/action_dispatch/routing/deprecated_mapper.rb index dd76391870..87dfaba6c7 100644 --- a/actionpack/lib/action_dispatch/routing/deprecated_mapper.rb +++ b/actionpack/lib/action_dispatch/routing/deprecated_mapper.rb @@ -175,7 +175,7 @@ module ActionDispatch optional = false elsif segment =~ /^:(\w+)$/ if defaults.has_key?($1.to_sym) - defaults.delete($1.to_sym) + defaults.delete($1.to_sym) if defaults[$1.to_sym].nil? else optional = false end -- cgit v1.2.3