Sha256: 5e46e82bc3177898e51662e3db65c15b6f22cffdfc07adea62c069cd27191bf2
Contents?: true
Size: 605 Bytes
Versions: 13
Compression:
Stored size: 605 Bytes
Contents
# frozen_string_literal: true module Decidim module Meetings module ContentBlocks class HighlightedMeetingsCell < Decidim::ContentBlocks::HighlightedElementsCell def base_relation Decidim::Meetings::Meeting.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
13 entries across 13 versions & 1 rubygems