Class: Trek::ListComponent
- Inherits:
-
Component
- Object
- Component
- Trek::ListComponent
- Defined in:
- app/components/trek/list_component.rb
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
21 22 23 24 25 26 27 28 29 30 |
# File 'app/components/trek/list_component.rb', line 21 def call tag.div( joined_content, class: classes, data: { controller: identifier, "trek--list-reorderable-value": reorderable } ) end |
#joined_content ⇒ Object
32 33 34 35 36 37 38 39 40 |
# File 'app/components/trek/list_component.rb', line 32 def joined_content return t(".empty") if items.empty? safe_join( items + [ reorderable ? hidden_field_tag(:order, "", data: stimulus_target_hash("orderInput")) : nil ] ) end |