Class: Decidim::Elections::HighlightedElectionsForComponentCell

Inherits:
ViewModel
  • Object
show all
Includes:
CardHelper, ComponentPathHelper, ElectionCellsHelper
Defined in:
app/cells/decidim/elections/highlighted_elections_for_component_cell.rb

Overview

This cell renders the highlighted elections for a given participatory space. It is intended to be used in the ‘participatory_space_highlighted_elements` view hook.

Instance Method Summary collapse

Instance Method Details

#items_blank?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'app/cells/decidim/elections/highlighted_elections_for_component_cell.rb', line 19

def items_blank?
  elections_count.zero?
end

#showObject



15
16
17
# File 'app/cells/decidim/elections/highlighted_elections_for_component_cell.rb', line 15

def show
  render unless items_blank?
end