Class: Decidim::Assemblies::ContentBlocks::ChildrenAssembliesCell

Inherits:
RelatedAssembliesCell
  • Object
show all
Defined in:
app/cells/decidim/assemblies/content_blocks/children_assemblies_cell.rb

Instance Method Summary collapse

Methods inherited from RelatedAssembliesCell

#show

Instance Method Details



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

def related_assemblies
  @related_assemblies ||= resource.children.visible_for(current_user).published.order(weight: :asc)
end

#total_countObject



11
12
13
# File 'app/cells/decidim/assemblies/content_blocks/children_assemblies_cell.rb', line 11

def total_count
  related_assemblies.size
end