Class: Avo::Index::GridItemComponent
- Inherits:
-
BaseComponent
- Object
- BaseComponent
- Avo::Index::GridItemComponent
- Includes:
- ResourcesHelper
- Defined in:
- app/components/avo/index/grid_item_component.rb
Instance Attribute Summary collapse
-
#parent_resource ⇒ Object
readonly
Returns the value of attribute parent_resource.
Instance Method Summary collapse
-
#initialize(resource: nil, reflection: nil, parent_model: nil, parent_resource: nil) ⇒ GridItemComponent
constructor
A new instance of GridItemComponent.
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_resource ⇒ Object (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 |