Sha256: 5b9cda56c733a7bd42b5a66f28dfb988cf86d8a4485f5436daddcf90d4709899

Contents?: true

Size: 607 Bytes

Versions: 23

Compression:

Stored size: 607 Bytes

Contents

# frozen_string_literal: true

require "active_support/concern"

module Decidim
  module Assemblies
    module Admin
      module Filterable
        extend ActiveSupport::Concern

        included do
          include Decidim::Admin::Filterable

          private

          # Unless we are explicitly looking for child assemblies, we filter them out.
          def base_query
            return collection if ransack_params[:parent_id_eq]

            collection.parent_assemblies
          end

          def extra_filters
            [:parent_id_eq]
          end
        end
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
decidim-assemblies-0.25.2 app/controllers/concerns/decidim/assemblies/admin/filterable.rb
decidim-assemblies-0.25.1 app/controllers/concerns/decidim/assemblies/admin/filterable.rb
decidim-assemblies-0.25.0 app/controllers/concerns/decidim/assemblies/admin/filterable.rb
decidim-assemblies-0.25.0.rc4 app/controllers/concerns/decidim/assemblies/admin/filterable.rb
decidim-assemblies-0.25.0.rc3 app/controllers/concerns/decidim/assemblies/admin/filterable.rb
decidim-assemblies-0.25.0.rc2 app/controllers/concerns/decidim/assemblies/admin/filterable.rb
decidim-assemblies-0.25.0.rc1 app/controllers/concerns/decidim/assemblies/admin/filterable.rb
decidim-assemblies-0.24.3 app/controllers/concerns/decidim/assemblies/admin/filterable.rb
decidim-assemblies-0.23.6 app/controllers/concerns/decidim/assemblies/admin/filterable.rb
decidim-assemblies-0.24.2 app/controllers/concerns/decidim/assemblies/admin/filterable.rb
decidim-assemblies-0.23.5 app/controllers/concerns/decidim/assemblies/admin/filterable.rb
decidim-assemblies-0.24.1 app/controllers/concerns/decidim/assemblies/admin/filterable.rb
decidim-assemblies-0.24.0 app/controllers/concerns/decidim/assemblies/admin/filterable.rb
decidim-assemblies-0.24.0.rc2 app/controllers/concerns/decidim/assemblies/admin/filterable.rb
decidim-assemblies-0.23.4 app/controllers/concerns/decidim/assemblies/admin/filterable.rb
decidim-assemblies-0.24.0.rc1 app/controllers/concerns/decidim/assemblies/admin/filterable.rb
decidim-assemblies-0.23.3 app/controllers/concerns/decidim/assemblies/admin/filterable.rb
decidim-assemblies-0.23.2 app/controllers/concerns/decidim/assemblies/admin/filterable.rb
decidim-assemblies-0.23.1 app/controllers/concerns/decidim/assemblies/admin/filterable.rb
decidim-assemblies-0.23.1.rc1 app/controllers/concerns/decidim/assemblies/admin/filterable.rb