Class: Decidim::CardMetadataCell
- Inherits:
-
ViewModel
- Object
- ViewModel
- Decidim::CardMetadataCell
- Includes:
- Cell::ViewModel::Partial, DateRangeHelper, ViewHooksHelper
- Defined in:
- app/cells/decidim/card_metadata_cell.rb
Overview
This cell is used to display metadata inside a list card so other cells only have to customize a few methods or overwrite views.
Instance Method Summary collapse
-
#initialize ⇒ CardMetadataCell
constructor
A new instance of CardMetadataCell.
- #show ⇒ Object
Methods included from ViewHooksHelper
Methods included from DateRangeHelper
Constructor Details
#initialize ⇒ CardMetadataCell
Returns a new instance of CardMetadataCell.
19 20 21 22 23 24 |
# File 'app/cells/decidim/card_metadata_cell.rb', line 19 def initialize(*) super @items ||= [] @items << space_item if show_space? end |
Instance Method Details
#show ⇒ Object
13 14 15 16 17 |
# File 'app/cells/decidim/card_metadata_cell.rb', line 13 def show return if items.blank? render end |