Class: Trek::PropertiesComponent::ItemComponent
- Inherits:
-
Component
- Object
- ViewComponent::Base
- Component
- Trek::PropertiesComponent::ItemComponent
show all
- Defined in:
- app/components/trek/properties_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
#call ⇒ Object
29
30
31
32
33
34
|
# File 'app/components/trek/properties_component.rb', line 29
def call
safe_join([
rendered_title,
rendered_content
].compact)
end
|
#rendered_content ⇒ Object
43
44
45
46
47
48
|
# File 'app/components/trek/properties_component.rb', line 43
def rendered_content
tag.dd(
formatted_content.presence || "–",
class: class_for("content")
)
end
|
#rendered_title ⇒ Object
36
37
38
39
40
41
|
# File 'app/components/trek/properties_component.rb', line 36
def rendered_title
tag.dt(
title_value,
class: class_for("title")
)
end
|
#title_value ⇒ Object
50
51
52
53
54
|
# File 'app/components/trek/properties_component.rb', line 50
def title_value
return model.human_attribute_name(title) if model
title
end
|