Class: Avo::Index::TableRowComponent

Inherits:
BaseComponent
  • Object
show all
Includes:
Concerns::ChecksShowAuthorization, ResourcesHelper
Defined in:
app/components/avo/index/table_row_component.rb

Constant Summary

Constants included from Concerns::FindAssociationField

Concerns::FindAssociationField::ASSOCIATIONS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Concerns::ChecksShowAuthorization

#can_view?

Methods included from Concerns::ChecksAssocAuthorization

#authorize_association_for

Methods included from ResourcesHelper

#field_wrapper, #filter_wrapper, #index_field_wrapper, #item_selector_data_attributes, #resource_grid, #resource_show_path, #resource_table

Methods inherited from BaseComponent

#has_with_trial

Methods included from Concerns::FindAssociationField

#find_association_field

Instance Attribute Details

#header_fields=(value) ⇒ Object (writeonly)

Sets the attribute header_fields

Parameters:

  • value

    the value to set the attribute header_fields to.



7
8
9
# File 'app/components/avo/index/table_row_component.rb', line 7

def header_fields=(value)
  @header_fields = value
end

Instance Method Details

#click_row_to_view_recordObject



28
29
30
# File 'app/components/avo/index/table_row_component.rb', line 28

def click_row_to_view_record
  Avo.configuration.click_row_to_view_record && can_view?
end

#resource_controls_componentObject



17
18
19
20
21
22
23
24
25
26
# File 'app/components/avo/index/table_row_component.rb', line 17

def resource_controls_component
  Avo::Index::ResourceControlsComponent.new(
    resource: @resource,
    reflection: @reflection,
    parent_record: @parent_record,
    parent_resource: @parent_resource,
    view_type: :table,
    actions: @actions
  )
end