Class: Decidim::Votings::OrganizationPromotedVotings

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

Overview

This query selects the promoted votings

Instance Method Summary collapse

Constructor Details

#initialize(organization) ⇒ OrganizationPromotedVotings

Returns a new instance of OrganizationPromotedVotings.


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

def initialize(organization)
  @organization = organization
end

Instance Method Details

#queryObject


11
12
13
# File 'decidim-elections/app/queries/decidim/votings/organization_promoted_votings.rb', line 11

def query
  Decidim::Votings::Voting.where(organization: @organization).promoted
end