Sha256: cc631740c03a42b07ee50965d2e1e5c9966cdbc432e17257616b39ac76f4c359

Contents?: true

Size: 465 Bytes

Versions: 12

Compression:

Stored size: 465 Bytes

Contents

# frozen_string_literal: true

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

      def initialize(organization)
        @organization = organization
      end

      def query
        Decidim::Consultations::Question.where(organization: @organization)
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
decidim-consultations-0.27.9 app/queries/decidim/consultations/organization_questions.rb
decidim-consultations-0.27.8 app/queries/decidim/consultations/organization_questions.rb
decidim-consultations-0.27.7 app/queries/decidim/consultations/organization_questions.rb
decidim-consultations-0.27.6 app/queries/decidim/consultations/organization_questions.rb
decidim-consultations-0.27.5 app/queries/decidim/consultations/organization_questions.rb
decidim-consultations-0.27.4 app/queries/decidim/consultations/organization_questions.rb
decidim-consultations-0.27.3 app/queries/decidim/consultations/organization_questions.rb
decidim-consultations-0.27.2 app/queries/decidim/consultations/organization_questions.rb
decidim-consultations-0.27.1 app/queries/decidim/consultations/organization_questions.rb
decidim-consultations-0.27.0 app/queries/decidim/consultations/organization_questions.rb
decidim-consultations-0.27.0.rc2 app/queries/decidim/consultations/organization_questions.rb
decidim-consultations-0.27.0.rc1 app/queries/decidim/consultations/organization_questions.rb