Sha256: 5a29b9a107663f8c109b8a21d1cca670c2c9ce40b7b6b25cc0e9b04d45e9caa5

Contents?: true

Size: 709 Bytes

Versions: 25

Compression:

Stored size: 709 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module ParticipatoryProcesses
    # This query class filters public processes given an organization and a
    # filter in a meaningful prioritized order.
    class OrganizationPrioritizedParticipatoryProcesses < Decidim::Query
      def initialize(organization, filter = "active", user = nil)
        @organization = organization
        @filter = filter
        @user = user
      end

      def query
        Decidim::Query.merge(
          OrganizationPublishedParticipatoryProcesses.new(@organization, @user),
          PrioritizedParticipatoryProcesses.new,
          FilteredParticipatoryProcesses.new(@filter)
        ).query
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
decidim-participatory_processes-0.27.2 app/queries/decidim/participatory_processes/organization_prioritized_participatory_processes.rb
decidim-participatory_processes-0.27.1 app/queries/decidim/participatory_processes/organization_prioritized_participatory_processes.rb
decidim-participatory_processes-0.27.0 app/queries/decidim/participatory_processes/organization_prioritized_participatory_processes.rb
decidim-participatory_processes-0.27.0.rc2 app/queries/decidim/participatory_processes/organization_prioritized_participatory_processes.rb
decidim-participatory_processes-0.27.0.rc1 app/queries/decidim/participatory_processes/organization_prioritized_participatory_processes.rb