Skip to content

Commit

Permalink
Merge pull request #3438 from timoschilling/cleanup_application_names…
Browse files Browse the repository at this point in the history
…pace

cleanup ActiveAdmin::Application#namespace
  • Loading branch information
seanlinsley committed Sep 14, 2014
2 parents 7dbf854 + dc9e542 commit 4e43ae2
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 4e43ae2

Please sign in to comment.