Class: Queryko::Filters::Batch

Inherits:
Base
  • Object
show all
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

#call, #initialize

Constructor Details

This class inherits a constructor from Queryko::Filters::Base

Instance Method Details

#param_key_formatObject



12
13
14
# File 'lib/queryko/filters/batch.rb', line 12

def param_key_format
  "by_#{column_name.pluralize}"
end

#perform(collection, token, query_object = nil) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/queryko/filters/batch.rb', line 4

def perform(collection, token, query_object = nil)
  collection.where(
    table_name => {
      column_name => token.split('')
    }
  )
end