Sha256: 7622d6bcf5edda9e0fb8988a32dab324275e6d6cc38832b27c980b5f0a0113f0
Contents?: true
Size: 747 Bytes
Versions: 13
Compression:
Stored size: 747 Bytes
Contents
# frozen_string_literal: true module Decidim module ContentBlocks class HighlightedElementsCell < BaseCell include Decidim::ContentBlocks::HasRelatedComponents def published_components @published_components ||= if model.settings.try(:component_id).present? components.published.where(id: model.settings.component_id) else components.published end end def block_id "#{model.scope_name}-#{model.manifest_name}".parameterize.gsub("_", "-") end private def components @components ||= components_for(model) end end end end
Version data entries
13 entries across 13 versions & 1 rubygems