Module: ActiveAdmin::ActiveResource::Base

Defined in:
lib/activeadmin/active_resource/base.rb

Defined Under Namespace

Modules: ClassMethods

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#inheritance_column=(value) ⇒ Object (writeonly)

Sets the attribute inheritance_column

Parameters:

  • value

    the value to set the attribute inheritance_column to.



6
7
8
# File 'lib/activeadmin/active_resource/base.rb', line 6

def inheritance_column=(value)
  @inheritance_column = value
end

Class Method Details

.prepended(base) ⇒ Object



126
127
128
129
130
131
132
# File 'lib/activeadmin/active_resource/base.rb', line 126

def self.prepended(base)
  base.collection_parser = ActiveAdmin::ActiveResource::Results

  class << base
    prepend ClassMethods
  end
end

Instance Method Details

#column_for_attribute(name) ⇒ Object



9
10
11
12
13
# File 'lib/activeadmin/active_resource/base.rb', line 9

def column_for_attribute(name)
  # => ActiveRecord::ConnectionAdapters::Column
  col_name = name.to_s
  send(:class).columns.find { |col| col.name == col_name }
end