Sha256: 4bceeb4f0cc638bb118b84d5ba678c7f5da2ee6268c701193bd36713f0982ff1

Contents?: true

Size: 408 Bytes

Versions: 5

Compression:

Stored size: 408 Bytes

Contents

# frozen_string_literal: true

module Decidim
  # This query orders processes by importance, prioritizing promoted processes
  # first, and closest to finalization date second.
  class PrioritizedParticipatoryProcesses < Rectify::Query
    def query
      Decidim::ParticipatoryProcess.order(promoted: :desc).includes(:active_step).order("decidim_participatory_process_steps.end_date ASC")
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
decidim-core-0.5.1 app/queries/decidim/prioritized_participatory_processes.rb
decidim-0.5.1 decidim-core/app/queries/decidim/prioritized_participatory_processes.rb
decidim-core-0.5.0 app/queries/decidim/prioritized_participatory_processes.rb
decidim-0.5.0 decidim-core/app/queries/decidim/prioritized_participatory_processes.rb
decidim-core-0.4.4 app/queries/decidim/prioritized_participatory_processes.rb