aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/routing.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/routing.rb')
-rw-r--r--actionpack/lib/action_controller/routing.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/routing.rb b/actionpack/lib/action_controller/routing.rb
index 406c6acb75..f0003e9974 100644
--- a/actionpack/lib/action_controller/routing.rb
+++ b/actionpack/lib/action_controller/routing.rb
@@ -119,7 +119,11 @@ module ActionController
options[:controller] = controller_class.controller_path
return nil, requirements_for(:controller) unless passes_requirements?(:controller, options[:controller])
elsif /^\*/ =~ item.to_s
- value = components.empty? ? @defaults[item].clone : components.clone
+ if components.empty?
+ value = @defaults.has_key?(item) ? @defaults[item].clone : []
+ else
+ value = components.clone
+ end
value.collect! {|c| CGI.unescape c}
components = []
def value.to_s() self.join('/') end