Sha256: b94b220d028897064ea2935b9cf38556d0142da029a1cfcc3e4f70efc863fc31

Contents?: true

Size: 475 Bytes

Versions: 12

Compression:

Stored size: 475 Bytes

Contents

# frozen_string_literal: true

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

      def initialize(organization)
        @organization = organization
      end

      def query
        Decidim::Consultation.where(organization: @organization).active
      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_active_consultations.rb
decidim-consultations-0.27.8 app/queries/decidim/consultations/organization_active_consultations.rb
decidim-consultations-0.27.7 app/queries/decidim/consultations/organization_active_consultations.rb
decidim-consultations-0.27.6 app/queries/decidim/consultations/organization_active_consultations.rb
decidim-consultations-0.27.5 app/queries/decidim/consultations/organization_active_consultations.rb
decidim-consultations-0.27.4 app/queries/decidim/consultations/organization_active_consultations.rb
decidim-consultations-0.27.3 app/queries/decidim/consultations/organization_active_consultations.rb
decidim-consultations-0.27.2 app/queries/decidim/consultations/organization_active_consultations.rb
decidim-consultations-0.27.1 app/queries/decidim/consultations/organization_active_consultations.rb
decidim-consultations-0.27.0 app/queries/decidim/consultations/organization_active_consultations.rb
decidim-consultations-0.27.0.rc2 app/queries/decidim/consultations/organization_active_consultations.rb
decidim-consultations-0.27.0.rc1 app/queries/decidim/consultations/organization_active_consultations.rb