Class: Decidim::Assemblies::ContentBlocks::RelatedAssembliesCell

Inherits:
ContentBlocks::BaseCell
  • Object
show all
Defined in:
app/cells/decidim/assemblies/content_blocks/related_assemblies_cell.rb

Direct Known Subclasses

ChildrenAssembliesCell

Instance Method Summary collapse

Instance Method Details



11
12
13
14
15
16
# File 'app/cells/decidim/assemblies/content_blocks/related_assemblies_cell.rb', line 11

def related_assemblies
  @related_assemblies ||=
    resource
    .linked_participatory_space_resources(:assembly, "included_participatory_processes")
    .public_spaces
end

#showObject



7
8
9
# File 'app/cells/decidim/assemblies/content_blocks/related_assemblies_cell.rb', line 7

def show
  render if total_count.positive?
end

#total_countObject



18
19
20
# File 'app/cells/decidim/assemblies/content_blocks/related_assemblies_cell.rb', line 18

def total_count
  related_assemblies.size
end