Class: Trek::EntriesComponent
- Inherits:
-
Component
- Object
- ViewComponent::Base
- Component
- Trek::EntriesComponent
show all
- Defined in:
- app/components/trek/entries_component.rb
Instance Method Summary
collapse
#stimulus_action, #stimulus_class, #stimulus_class_hash, #stimulus_class_key, #stimulus_target, #stimulus_target_hash, #stimulus_target_key, #stimulus_value, #stimulus_value_hash, #stimulus_value_key
#class_for, #class_names_for, #root_class
#identifier
Instance Method Details
#before_render ⇒ Object
7
8
9
|
# File 'app/components/trek/entries_component.rb', line 7
def before_render
content
end
|
#call ⇒ Object
11
12
13
14
15
16
|
# File 'app/components/trek/entries_component.rb', line 11
def call
tag.div(
joined_content,
class: root_class
)
end
|
#joined_content ⇒ Object
18
19
20
21
22
|
# File 'app/components/trek/entries_component.rb', line 18
def joined_content
return t(".empty") if items.empty?
safe_join(items)
end
|