Fixes a regression caused by having mapping options controller and action as blank

Signed-off-by: José Valim <jose.valim@gmail.com>
This commit is contained in:
Santiago Pastorino
2010-07-12 14:42:57 -03:00
committed by José Valim
parent 3d7e411953
commit d030f830cf

View File

@@ -152,7 +152,10 @@ module ActionDispatch
raise ArgumentError, "missing :action"
end
{ :controller => controller, :action => action }
{ :controller => controller, :action => action }.tap do |hash|
hash.delete(:controller) if hash[:controller].blank?
hash.delete(:action) if hash[:action].blank?
end
end
end