Class: Katalyst::Tables::Collection::Type::Search

Inherits:
Value
  • Object
show all
Defined in:
lib/katalyst/tables/collection/type/search.rb

Instance Attribute Summary

Attributes inherited from Value

#scope

Instance Method Summary collapse

Methods inherited from Value

#filter, #filter?, #filterable?, #suggestions, #to_param

Constructor Details

#initialize(scope:) ⇒ Search

rubocop:disable Lint/UselessMethodDefinition



10
11
12
# File 'lib/katalyst/tables/collection/type/search.rb', line 10

def initialize(scope:, **)
  super
end

Instance Method Details

#filter_condition(model, _, value) ⇒ Object



19
20
21
# File 'lib/katalyst/tables/collection/type/search.rb', line 19

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

#typeObject

rubocop:enable Lint/UselessMethodDefinition



15
16
17
# File 'lib/katalyst/tables/collection/type/search.rb', line 15

def type
  :search
end