Class: Decidim::Votings::PrioritizedVotings

Inherits:
Query
  • Object
show all
Defined in:
decidim-elections/app/queries/decidim/votings/prioritized_votings.rb

Overview

This query orders votings by importance, prioritizing promoted votings.

Instance Method Summary collapse

Methods inherited from Query

#cached_query, #each, #eager?, #exists?, #initialize, merge, #none?, #relation?, #|

Constructor Details

This class inherits a constructor from Decidim::Query

Instance Method Details

#queryObject


8
9
10
# File 'decidim-elections/app/queries/decidim/votings/prioritized_votings.rb', line 8

def query
  Decidim::Votings::Voting.order(promoted: :desc)
end