Class: Olivander::Components::TablePortletComponent

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/components/olivander/components/table_portlet_component.rb

Defined Under Namespace

Classes: Builder, TableComponent

Instance Method Summary collapse

Constructor Details

#initialize(collection, *args) ⇒ TablePortletComponent

Returns a new instance of TablePortletComponent.



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'app/components/olivander/components/table_portlet_component.rb', line 9

def initialize(collection, *args)
  super
  options = args.extract_options!
  @collection = collection
  @builder = options[:builder]
  @title = options[:title] || ''
  @card_type = options[:card_type] || 'card-default'
  @background = options[:background]
  @header_background = options[:header_background]
  @turbo_frame = options[:turbo_frame]
  @max_height = options[:max_height]
  @headers = options[:headers].nil? ? true : options[:headers]
  @id = options[:id]
  @card_data = options[:card_data]
  @turbo_frame_data = options[:turbo_frame_data]
end