Class: Avo::Index::GridItemComponent

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

Instance Method Summary collapse

Methods included from ResourcesHelper

#edit_field_wrapper, #filter_wrapper, #index_field_wrapper, #item_select_all_input, #item_selector_init, #item_selector_input, #resource_grid, #resource_table, #show_field_wrapper

Constructor Details

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

Returns a new instance of GridItemComponent.



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

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