Skip to content

Commit

Permalink
cleanup ActiveAdmin::Application#namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
timoschilling committed Sep 14, 2014
1 parent 6344d29 commit dc9e542
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/active_admin/application.rb
Expand Up @@ -128,11 +128,10 @@ def register(resource, options = {}, &block)
def namespace(name)
name ||= :root

if namespaces[name]
namespace = namespaces[name]
else
namespace = namespaces[name] = Namespace.new(self, name)
namespace = namespaces[name] ||= begin
namespace = Namespace.new(self, name)
ActiveAdmin::Event.dispatch ActiveAdmin::Namespace::RegisterEvent, namespace
namespace
end

yield(namespace) if block_given?
Expand Down

0 comments on commit dc9e542

Please sign in to comment.