Class: Decidim::Votings::OrganizationVotings

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

Overview

This query class filters all votings given an organization.

Instance Method Summary collapse

Constructor Details

#initialize(organization) ⇒ OrganizationVotings

Returns a new instance of OrganizationVotings.


7
8
9
# File 'decidim-elections/app/queries/decidim/votings/organization_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_votings.rb', line 11

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