Class: Decidim::Votings::OrganizationPublishedVotings

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

Overview

This query class filters published votings given an organization.

Instance Method Summary collapse

Constructor Details

#initialize(organization) ⇒ OrganizationPublishedVotings

Returns a new instance of OrganizationPublishedVotings.


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

def initialize(organization)
  @organization = organization
end

Instance Method Details

#queryObject


11
12
13
14
15
16
# File 'decidim-elections/app/queries/decidim/votings/organization_published_votings.rb', line 11

def query
  Rectify::Query.merge(
    OrganizationVotings.new(@organization),
    PublishedVotings.new
  ).query
end