The controller key shouldnt be part of the mapping if its not used

This commit is contained in:
David Heinemeier Hansson 2009-12-25 10:14:44 -08:00
parent a8f1ee5986
commit 7f5d44bac5

@ -92,9 +92,9 @@ def defaults
controller, action = to.split('#') controller, action = to.split('#')
{ :controller => controller, :action => action } { :controller => controller, :action => action }
when Symbol when Symbol
{ :controller => default_controller, :action => to.to_s } { :action => to.to_s }.merge(default_controller ? { :controller => default_controller } : {})
else else
{ :controller => default_controller } default_controller ? { :controller => default_controller } : {}
end end
if defaults[:controller].blank? && segment_keys.exclude?("controller") if defaults[:controller].blank? && segment_keys.exclude?("controller")