diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-07-12 14:42:57 -0300 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-07-12 19:47:28 +0200 |
commit | d030f830cfd903d43cd1436b0e97389728491f42 (patch) | |
tree | cbeca34c50aa6564e6ba5daade73d3351f5bc073 /actionpack | |
parent | 3d7e4119539f373720bc9aa398ecbb6542c7dc21 (diff) | |
download | rails-d030f830cfd903d43cd1436b0e97389728491f42.tar.gz rails-d030f830cfd903d43cd1436b0e97389728491f42.tar.bz2 rails-d030f830cfd903d43cd1436b0e97389728491f42.zip |
Fixes a regression caused by having mapping options controller and action as blank
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 5 |
1 files changed, 4 insertions, 1 deletions
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 |