diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-11-15 14:22:06 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-11-15 14:22:06 -0800 |
commit | e4591489d13a27e2f905988be02a7d48fb7a0664 (patch) | |
tree | 9508fba5659f3c6a8c87e1b14373dfd3752345e3 /actionpack/lib/action_dispatch | |
parent | 0be181bfa03f8340fa4945f891409c25a804de7f (diff) | |
download | rails-e4591489d13a27e2f905988be02a7d48fb7a0664.tar.gz rails-e4591489d13a27e2f905988be02a7d48fb7a0664.tar.bz2 rails-e4591489d13a27e2f905988be02a7d48fb7a0664.zip |
reduce method calls
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 729582684e..bf3110cc66 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -164,10 +164,10 @@ module ActionDispatch raise ArgumentError, "missing :action" end - { :controller => controller, :action => action }.tap do |hash| - hash.delete(:controller) if hash[:controller].blank? - hash.delete(:action) if hash[:action].blank? - end + hash = {} + hash[:controller] = controller if controller + hash[:action] = action if action + hash end end |