Class: Avo::Fields::BelongsToField::ShowComponent

Inherits:
ShowComponent show all
Defined in:
app/components/avo/fields/belongs_to_field/show_component.rb

Constant Summary

Constants included from Concerns::FindAssociationField

Concerns::FindAssociationField::ASSOCIATIONS

Instance Attribute Summary

Attributes inherited from ShowComponent

#compact, #field, #index, #kwargs, #resource, #short, #stacked, #view

Instance Method Summary collapse

Methods inherited from ShowComponent

#disabled?, #field_wrapper_args, #initialize, #stimulus_attributes, #wrapper_data

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

Constructor Details

This class inherits a constructor from Avo::Fields::ShowComponent

Instance Method Details

#resource_view_pathObject



4
5
6
7
8
9
10
11
# File 'app/components/avo/fields/belongs_to_field/show_component.rb', line 4

def resource_view_path
  helpers.resource_view_path(
    record: @field.value,
    resource: @field.target_resource,
    via_resource_class: @resource.class.to_s,
    via_record_id: @resource.record_param
  )
end