Sha256: 78cbbc9b402f112df3858dfaaf51e9266009506af6f6f1ff3a189eaa568ac786
Contents?: true
Size: 930 Bytes
Versions: 14
Compression:
Stored size: 930 Bytes
Contents
# frozen_string_literal: true module Decidim module Initiatives module ContentBlocks class HighlightedInitiativesCell < Decidim::ViewModel include Decidim::SanitizeHelper delegate :current_organization, to: :controller def show render if highlighted_initiatives.any? end def max_results model.settings.max_results end def highlighted_initiatives @highlighted_initiatives ||= OrganizationPrioritizedInitiatives .new(current_organization) .query .limit(max_results) end def i18n_scope "decidim.initiatives.pages.home.highlighted_initiatives" end def decidim_initiatives Decidim::Initiatives::Engine.routes.url_helpers end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems