Class: Queryko::Filters::Batch
- Defined in:
- lib/queryko/filters/batch.rb
Instance Attribute Summary
Attributes inherited from Base
#as, #column_name, #feature, #field, #query_object, #table_name, #table_name_override
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Queryko::Filters::Base
Instance Method Details
#param_key_format ⇒ Object
14 15 16 |
# File 'lib/queryko/filters/batch.rb', line 14 def param_key_format "by_#{column_name.pluralize}" end |
#perform(collection, token, query_object = nil) ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/queryko/filters/batch.rb', line 4 def perform(collection, token, query_object = nil) collection.where("#{table_name}.#{column_name} IN (?)", token.split(',')) # collection.where( # table_name => { # column_name => token.split('') # } # ) end |