lib/administrador/configuration.rb in administrador-0.0.28.pre vs lib/administrador/configuration.rb in administrador-0.0.29.pre

- old
+ new

@@ -2,16 +2,20 @@ module Configuration def configure yield self end - mattr_accessor(:engines) { {} } mattr_accessor(:features) { {} } mattr_accessor(:resource_label_methods) { [:human, :name, :email, :to_s] } mattr_accessor(:base_controller_class_name) { '::ApplicationController' } + mattr_accessor(:initial_engine_sidebar_state) { :closed } + def self.engines + Administrador::RegisteredEngine.all + end + def register_engine(name, options = {}) - @@engines[name] = Administrador::RegisteredEngine.new(name, options) + Administrador::RegisteredEngine.create(name: name, options: options) end def enable_feature(name, options = {}) @@features[name] = Administrador::Feature.new(name, options) end