Class: Decidim::Proposals::HighlightedProposalsForComponentCell

Inherits:
ViewModel
  • Object
show all
Includes:
CardHelper, ComponentPathHelper
Defined in:
app/cells/decidim/proposals/highlighted_proposals_for_component_cell.rb

Overview

This cell renders the highlighted proposals for a given component. 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)


18
19
20
# File 'app/cells/decidim/proposals/highlighted_proposals_for_component_cell.rb', line 18

def items_blank?
  proposals_count.zero?
end

#showObject



14
15
16
# File 'app/cells/decidim/proposals/highlighted_proposals_for_component_cell.rb', line 14

def show
  render unless items_blank?
end