Class: Decidim::Votings::OrganizationPrioritizedVotings
- Inherits:
-
Query
- Object
- Query
- Decidim::Votings::OrganizationPrioritizedVotings
- Defined in:
- app/queries/decidim/votings/organization_prioritized_votings.rb
Overview
This query class filters public votings given an organization in a meaningful prioritized order.
Instance Method Summary collapse
-
#initialize(organization, user = nil) ⇒ OrganizationPrioritizedVotings
constructor
A new instance of OrganizationPrioritizedVotings.
- #query ⇒ Object
Constructor Details
#initialize(organization, user = nil) ⇒ OrganizationPrioritizedVotings
Returns a new instance of OrganizationPrioritizedVotings.
8 9 10 11 |
# File 'app/queries/decidim/votings/organization_prioritized_votings.rb', line 8 def initialize(organization, user = nil) @organization = organization @user = user end |
Instance Method Details
#query ⇒ Object
13 14 15 16 17 18 |
# File 'app/queries/decidim/votings/organization_prioritized_votings.rb', line 13 def query Decidim::Query.merge( OrganizationPublishedVotings.new(@organization), PrioritizedVotings.new ).query end |