Sha256: 5aa8628ad48845c2c34faaca429761303d85350932f5de07f15fe3ea6c2c40e5
Contents?: true
Size: 999 Bytes
Versions: 37
Compression:
Stored size: 999 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 order model.settings.order end def highlighted_initiatives @highlighted_initiatives ||= OrganizationPrioritizedInitiatives .new(current_organization, order) .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
37 entries across 37 versions & 1 rubygems