Class: Decidim::CardCell
- Inherits:
-
ViewModel
- Object
- ViewModel
- Decidim::CardCell
- Defined in:
- app/cells/decidim/card_cell.rb
Overview
This cell renders the card of the given instance of a Component delegated to the components' cell if specified in the manifest otherwise a primary cell will be shown.
Direct Known Subclasses
Constant Summary collapse
- ICONS_MAPPING =
{ published_at: "calendar-line", votings_count: "check-double-line", followers_count: "user-voice-line", participatory_space: "treasure-map-line" }.freeze
Instance Method Summary collapse
Instance Method Details
#metadata ⇒ Object
29 30 31 |
# File 'app/cells/decidim/card_cell.rb', line 29 def @metadata ||= end |
#show ⇒ Object
15 16 17 18 19 20 21 |
# File 'app/cells/decidim/card_cell.rb', line 15 def show if resource_cell? cell(resource_cell, model, ) else render :show end end |
#title ⇒ Object
23 24 25 26 27 |
# File 'app/cells/decidim/card_cell.rb', line 23 def title return if title_value.blank? render end |