Class: RailsAdmin::Config::Sections::Base

Inherits:
Object
  • Object
show all
Includes:
Configurable, HasDescription, HasFields, HasGroups, Inspectable, Proxyable
Defined in:
lib/rails_admin/config/sections/base.rb

Overview

Configuration of the show view for a new object

Direct Known Subclasses

Edit, Export, List, Show

Constant Summary collapse

NAMED_INSTANCE_VARIABLES =
%i[@parent @root @abstract_model].freeze

Instance Attribute Summary collapse

Attributes included from HasDescription

#description

Instance Method Summary collapse

Methods included from HasDescription

#desc

Methods included from HasGroups

#group, #visible_groups

Methods included from HasFields

#all_fields, #configure, #exclude_fields, #field, #fields, #fields_of_type, #include_all_fields, #include_fields, #possible_fields, #visible_fields

Methods included from Inspectable

#inspect

Methods included from Configurable

#has_option?, included, #register_deprecated_instance_option, #register_instance_option

Methods included from Proxyable

#bindings, #bindings=, #with

Constructor Details

#initialize(parent) ⇒ Base

Returns a new instance of Base.



27
28
29
30
31
32
# File 'lib/rails_admin/config/sections/base.rb', line 27

def initialize(parent)
  @parent = parent
  @root = parent.root

  @abstract_model = root.abstract_model
end

Instance Attribute Details

#abstract_modelObject (readonly)

Returns the value of attribute abstract_model.



23
24
25
# File 'lib/rails_admin/config/sections/base.rb', line 23

def abstract_model
  @abstract_model
end

#parentObject (readonly)

Returns the value of attribute parent.



23
24
25
# File 'lib/rails_admin/config/sections/base.rb', line 23

def parent
  @parent
end

#rootObject (readonly)

Returns the value of attribute root.



23
24
25
# File 'lib/rails_admin/config/sections/base.rb', line 23

def root
  @root
end