lib/simple_admin.rb in simple_admin-0.3.0 vs lib/simple_admin.rb in simple_admin-0.3.1

- old
+ new

@@ -76,12 +76,14 @@ # SimpleAdmin.register :post do # end # # Various configuration options are available within the block def register(resource, options={}, &block) - interface = SimpleAdmin::Interface.new(resource, options, &block) - self.registered << interface - interface + if defined?(@@registered) + interface = SimpleAdmin::Interface.new(resource, options, &block) + self.registered << interface + interface + end end end class ConfigurationNotFound < StandardError attr_accessor :message