aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-02-18 23:53:18 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-02-18 23:53:18 +0000
commit5760a6cb3e3f3ce3b41c25023f3fbb875590c5bc (patch)
treed54fadf41808696740eee335a08efe8c4dccd7e1 /actionpack/lib
parent519fe7ccbc5798aa957e9a8ea146bb825cd79b9e (diff)
downloadrails-5760a6cb3e3f3ce3b41c25023f3fbb875590c5bc.tar.gz
rails-5760a6cb3e3f3ce3b41c25023f3fbb875590c5bc.tar.bz2
rails-5760a6cb3e3f3ce3b41c25023f3fbb875590c5bc.zip
Clear route defaults using :name => nil #663
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@671 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_controller/routing.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/routing.rb b/actionpack/lib/action_controller/routing.rb
index 1f4d56ec01..1206fda5ec 100644
--- a/actionpack/lib/action_controller/routing.rb
+++ b/actionpack/lib/action_controller/routing.rb
@@ -176,6 +176,7 @@ module ActionController
options = options.symbolize_keys
defaults = request.path_parameters.symbolize_keys
expand_controller_path!(options, defaults)
+ defaults.delete_if {|k, v| options.key?(k) && options[k].nil?} # Remove defaults that have been manually cleared using :name => nil
failures = []
selected = nil