class RailsAdmin::Config::Sections::Base

Configuration of the show view for a new object

Attributes

abstract_model[R]
parent[R]
root[R]

Public Class Methods

new(parent) click to toggle source
# File lib/rails_admin/config/sections/base.rb, line 20
def initialize(parent)
  @parent = parent
  @root = parent.root

  @abstract_model = root.abstract_model
end

Public Instance Methods

inspect() click to toggle source
# File lib/rails_admin/config/sections/base.rb, line 27
def inspect
  "#<#{self.class.name} #{
    instance_variables.map do |v|
      value = instance_variable_get(v)
      if [:@parent, :@root, :@abstract_model].include? v
        if value.respond_to? :name
          "#{v}=#{value.name.inspect}"
        else
          "#{v}=#{value.class.name}"
        end
      else
        "#{v}=#{value.inspect}"
      end
    end.join(", ")
  }>"
end