Class: Avo::Index::GridItemComponent

Inherits:
BaseComponent
  • Object
show all
Includes:
ResourcesHelper
Defined in:
app/components/avo/index/grid_item_component.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ResourcesHelper

#field_wrapper, #filter_wrapper, #index_field_wrapper, #item_select_all_input, #item_selector_init, #item_selector_input, #resource_grid, #resource_table

Constructor Details

#initialize(resource: nil, reflection: nil, parent_model: nil, parent_resource: nil) ⇒ GridItemComponent

Returns a new instance of GridItemComponent.



8
9
10
11
12
13
14
# File 'app/components/avo/index/grid_item_component.rb', line 8

def initialize(resource: nil, reflection: nil, parent_model: nil, parent_resource: nil)
  @resource = resource
  @reflection = reflection
  @grid_fields = resource.get_grid_fields
  @parent_model = parent_model
  @parent_resource = parent_resource
end

Instance Attribute Details

#parent_resourceObject (readonly)

Returns the value of attribute parent_resource.



6
7
8
# File 'app/components/avo/index/grid_item_component.rb', line 6

def parent_resource
  @parent_resource
end