Sha256: 9ab2b466c9a53e41adb958f749f02e054a40df44c66a64fdab6485c1212b349e

Contents?: true

Size: 371 Bytes

Versions: 25

Compression:

Stored size: 371 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Votings
    # This query class filters all votings given an organization.
    class OrganizationVotings < Rectify::Query
      def initialize(organization)
        @organization = organization
      end

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

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
decidim-elections-0.24.2 app/queries/decidim/votings/organization_votings.rb
decidim-elections-0.24.1 app/queries/decidim/votings/organization_votings.rb
decidim-elections-0.24.0 app/queries/decidim/votings/organization_votings.rb
decidim-elections-0.24.0.rc2 app/queries/decidim/votings/organization_votings.rb
decidim-elections-0.24.0.rc1 app/queries/decidim/votings/organization_votings.rb