From 0b987042bf611330609304a22465d0f30f026076 Mon Sep 17 00:00:00 2001
From: Aaron Patterson <aaron.patterson@gmail.com>
Date: Tue, 26 Jul 2011 17:49:19 -0700
Subject: simplify conditionals by assuming hash values will never be `false`

---
 actionpack/lib/action_dispatch/routing/mapper.rb | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb
index 187e2a8a74..53374949ae 100644
--- a/actionpack/lib/action_dispatch/routing/mapper.rb
+++ b/actionpack/lib/action_dispatch/routing/mapper.rb
@@ -224,19 +224,11 @@ module ActionDispatch
           end
 
           def default_controller
-            if @options[:controller]
-              @options[:controller]
-            elsif @scope[:controller]
-              @scope[:controller]
-            end
+            @options[:controller] || @scope[:controller]
           end
 
           def default_action
-            if @options[:action]
-              @options[:action]
-            elsif @scope[:action]
-              @scope[:action]
-            end
+            @options[:action] || @scope[:action]
           end
       end
 
-- 
cgit v1.2.3