Sha256: 58eef5f79c95d943b3142add8bf76fa6a707787bbe7c08a9733baccc998fc3bf

Contents?: true

Size: 462 Bytes

Versions: 63

Compression:

Stored size: 462 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Consultations
    # This query class filters all consultations given an organization.
    class OrganizationConsultations < Rectify::Query
      def self.for(organization)
        new(organization).query
      end

      def initialize(organization)
        @organization = organization
      end

      def query
        Decidim::Consultation.where(organization: @organization)
      end
    end
  end
end

Version data entries

63 entries across 63 versions & 1 rubygems

Version Path
decidim-consultations-0.23.6 app/queries/decidim/consultations/organization_consultations.rb
decidim-consultations-0.24.2 app/queries/decidim/consultations/organization_consultations.rb
decidim-consultations-0.23.5 app/queries/decidim/consultations/organization_consultations.rb
decidim-consultations-0.24.1 app/queries/decidim/consultations/organization_consultations.rb
decidim-consultations-0.24.0 app/queries/decidim/consultations/organization_consultations.rb
decidim-consultations-0.24.0.rc2 app/queries/decidim/consultations/organization_consultations.rb
decidim-consultations-0.23.4 app/queries/decidim/consultations/organization_consultations.rb
decidim-consultations-0.24.0.rc1 app/queries/decidim/consultations/organization_consultations.rb
decidim-consultations-0.23.3 app/queries/decidim/consultations/organization_consultations.rb
decidim-consultations-0.23.2 app/queries/decidim/consultations/organization_consultations.rb
decidim-consultations-0.23.1 app/queries/decidim/consultations/organization_consultations.rb
decidim-consultations-0.23.1.rc1 app/queries/decidim/consultations/organization_consultations.rb
decidim-consultations-0.23.0 app/queries/decidim/consultations/organization_consultations.rb
decidim-consultations-0.22.0 app/queries/decidim/consultations/organization_consultations.rb
decidim-consultations-0.21.0 app/queries/decidim/consultations/organization_consultations.rb
decidim-consultations-0.20.1 app/queries/decidim/consultations/organization_consultations.rb
decidim-consultations-0.20.0 app/queries/decidim/consultations/organization_consultations.rb
decidim-consultations-0.19.1 app/queries/decidim/consultations/organization_consultations.rb
decidim-consultations-0.18.1 app/queries/decidim/consultations/organization_consultations.rb
decidim-consultations-0.19.0 app/queries/decidim/consultations/organization_consultations.rb