Sha256: 1eb1bfdb692b3e0bc56081cdd3394cdd3af1e776e4a95818ef4a176a85a4df63
Contents?: true
Size: 643 Bytes
Versions: 10
Compression:
Stored size: 643 Bytes
Contents
# frozen_string_literal: true module Decidim module ContentBlocks class ParticipatorySpaceDocumentsCell < BaseCell COMPONENTS_WITH_DOCUMENTS_COLLECTIONS = [:meetings].freeze def components_collections components = resource.try(:components) return [] if components.blank? components = components.where(manifest_name: COMPONENTS_WITH_DOCUMENTS_COLLECTIONS).published include_component_name = components.count > 1 components.map do |component| Decidim::ComponentAttachmentCollectionPresenter.new(component, include_component_name:) end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems