diff --git a/lib/active_admin/router.rb b/lib/active_admin/router.rb
index <HASH>..<HASH> 100644
--- a/lib/active_admin/router.rb
+++ b/lib/active_admin/router.rb
@@ -41,14 +41,12 @@ module ActiveAdmin
     end
 
     def define_resource_routes(router, config)
-      routes = proc { define_routes(router, config) }
-
+      if config.namespace.root?
+        define_routes(router, config)
+      else
         # Add on the namespace if required
-      unless config.namespace.root?
-        routes = proc { define_namespace(router, config) }
+        define_namespace(router, config)
       end
-
-      routes.call
     end
 
     def define_routes(router, config)
Simplify #define_routes.