Sha256: 9068f86465553b11e2c7eff03b0388079a0c0babb38da9a6384e35cc4e1b6dea
Contents?: true
Size: 622 Bytes
Versions: 2
Compression:
Stored size: 622 Bytes
Contents
# frozen_string_literal: true module Decidim module Meetings module ContentBlocks class HighlightedMeetingsCell < Decidim::ContentBlocks::HighlightedElementsCell def base_relation Decidim::Meetings::Meeting.except_withdrawn.where(component: published_components) end def elements @elements ||= base_relation.order(start_time: :asc).limit(limit) end def geolocation_enabled? Decidim::Map.available?(:geocoding) end private def limit geolocation_enabled? ? 4 : 8 end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems