From d030f830cfd903d43cd1436b0e97389728491f42 Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Mon, 12 Jul 2010 14:42:57 -0300 Subject: Fixes a regression caused by having mapping options controller and action as blank MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Valim --- actionpack/lib/action_dispatch/routing/mapper.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'actionpack/lib/action_dispatch/routing') diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 6a4b57e3f9..526c97ff8e 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -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 -- cgit v1.2.3