Class: Avo::Fields::ShowComponent

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

Instance Attribute Summary collapse

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(field: nil, resource: nil, index: 0, form: nil) ⇒ ShowComponent

Returns a new instance of ShowComponent.



8
9
10
11
12
13
# File 'app/components/avo/fields/show_component.rb', line 8

def initialize(field: nil, resource: nil, index: 0, form: nil)
  @field = field
  @resource = resource
  @index = index
  @view = :show
end

Instance Attribute Details

#viewObject (readonly)

Returns the value of attribute view.



6
7
8
# File 'app/components/avo/fields/show_component.rb', line 6

def view
  @view
end