Class: Decidim::ParticipatoryProcesses::PrioritizedParticipatoryProcesses

Inherits:
Rectify::Query
  • Object
show all
Defined in:
decidim-participatory_processes/app/queries/decidim/participatory_processes/prioritized_participatory_processes.rb

Overview

This query orders processes by importance, prioritizing promoted processes first, and closest to finalization date second.

Instance Method Summary collapse

Instance Method Details

#queryObject


8
9
10
# File 'decidim-participatory_processes/app/queries/decidim/participatory_processes/prioritized_participatory_processes.rb', line 8

def query
  Decidim::ParticipatoryProcess.order(promoted: :desc).includes(:active_step).order("decidim_participatory_process_steps.end_date ASC")
end