Module: RailsAdmin::Config::Configurable

Included in:
Actions::Base, Fields::Base, Fields::Group, Model, Sections::Base
Defined in:
lib/rails_admin/config/configurable.rb

Overview

A module for all configurables.

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary (collapse)

Instance Method Details

- (Boolean) has_option?(name)

Returns:

  • (Boolean)


10
11
12
13
# File 'lib/rails_admin/config/configurable.rb', line 10

def has_option?(name)
  options = self.class.instance_variable_get("@config_options")
  options && options.has_key?(name)
end

- (Object) register_deprecated_instance_option(option_name, replacement_option_name)



21
22
23
24
# File 'lib/rails_admin/config/configurable.rb', line 21

def register_deprecated_instance_option(option_name, replacement_option_name)
  scope = class << self; self; end;
  self.class.register_deprecated_instance_option(option_name, replacement_option_name, scope)
end

- (Object) register_instance_option(option_name, &default)

Register an instance option for this object only



16
17
18
19
# File 'lib/rails_admin/config/configurable.rb', line 16

def register_instance_option(option_name, &default)
  scope = class << self; self; end;
  self.class.register_instance_option(option_name, scope, &default)
end