Sha256: fc04de20373883886b81adc3f3a65fe4498743b149de654de9644f3af9ea621f

Contents?: true

Size: 574 Bytes

Versions: 22

Compression:

Stored size: 574 Bytes

Contents

# frozen_string_literal: true

module Katalyst
  module Tables
    module Collection
      module Type
        class Search < Value
          # @overwrite Value.initialize() to require scope
          # rubocop:disable Lint/UselessMethodDefinition
          def initialize(scope:, **)
            super
          end
          # rubocop:enable Lint/UselessMethodDefinition

          def type
            :search
          end

          def filter_condition(model, _, value)
            model.public_send(scope, value)
          end
        end
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
katalyst-tables-3.7.0 lib/katalyst/tables/collection/type/search.rb
katalyst-tables-3.6.2 lib/katalyst/tables/collection/type/search.rb
katalyst-tables-3.6.1 lib/katalyst/tables/collection/type/search.rb
katalyst-tables-3.6.0 lib/katalyst/tables/collection/type/search.rb
katalyst-tables-3.5.5 lib/katalyst/tables/collection/type/search.rb
katalyst-tables-3.5.4 lib/katalyst/tables/collection/type/search.rb
katalyst-tables-3.5.3 lib/katalyst/tables/collection/type/search.rb
katalyst-tables-3.5.2 lib/katalyst/tables/collection/type/search.rb
katalyst-tables-3.5.1 lib/katalyst/tables/collection/type/search.rb
katalyst-tables-3.5.0 lib/katalyst/tables/collection/type/search.rb
katalyst-tables-3.4.6 lib/katalyst/tables/collection/type/search.rb
katalyst-tables-3.4.5 lib/katalyst/tables/collection/type/search.rb
katalyst-tables-3.4.4 lib/katalyst/tables/collection/type/search.rb
katalyst-tables-3.4.3 lib/katalyst/tables/collection/type/search.rb
katalyst-tables-3.4.2 lib/katalyst/tables/collection/type/search.rb
katalyst-tables-3.4.1 lib/katalyst/tables/collection/type/search.rb
katalyst-tables-3.4.0 lib/katalyst/tables/collection/type/search.rb
katalyst-tables-3.3.4 lib/katalyst/tables/collection/type/search.rb
katalyst-tables-3.3.3 lib/katalyst/tables/collection/type/search.rb
katalyst-tables-3.3.2 app/models/katalyst/tables/collection/type/search.rb