Sha256: ab6e7eff134748ccb28573808934255cf4652d523e106bb461e40011e63df18a

Contents?: true

Size: 475 Bytes

Versions: 63

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 < Rectify::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

63 entries across 63 versions & 1 rubygems

Version Path
decidim-consultations-0.26.10 app/queries/decidim/consultations/organization_active_consultations.rb
decidim-consultations-0.26.9 app/queries/decidim/consultations/organization_active_consultations.rb
decidim-consultations-0.26.8 app/queries/decidim/consultations/organization_active_consultations.rb
decidim-consultations-0.26.7 app/queries/decidim/consultations/organization_active_consultations.rb
decidim-consultations-0.26.5 app/queries/decidim/consultations/organization_active_consultations.rb
decidim-consultations-0.26.4 app/queries/decidim/consultations/organization_active_consultations.rb
decidim-consultations-0.26.3 app/queries/decidim/consultations/organization_active_consultations.rb
decidim-consultations-0.26.2 app/queries/decidim/consultations/organization_active_consultations.rb
decidim-consultations-0.26.1 app/queries/decidim/consultations/organization_active_consultations.rb
decidim-consultations-0.26.0 app/queries/decidim/consultations/organization_active_consultations.rb
decidim-consultations-0.26.0.rc2 app/queries/decidim/consultations/organization_active_consultations.rb
decidim-consultations-0.26.0.rc1 app/queries/decidim/consultations/organization_active_consultations.rb
decidim-consultations-0.25.2 app/queries/decidim/consultations/organization_active_consultations.rb
decidim-consultations-0.25.1 app/queries/decidim/consultations/organization_active_consultations.rb
decidim-consultations-0.25.0 app/queries/decidim/consultations/organization_active_consultations.rb
decidim-consultations-0.25.0.rc4 app/queries/decidim/consultations/organization_active_consultations.rb
decidim-consultations-0.25.0.rc3 app/queries/decidim/consultations/organization_active_consultations.rb
decidim-consultations-0.25.0.rc2 app/queries/decidim/consultations/organization_active_consultations.rb
decidim-consultations-0.25.0.rc1 app/queries/decidim/consultations/organization_active_consultations.rb
decidim-consultations-0.24.3 app/queries/decidim/consultations/organization_active_consultations.rb