Class: Queryko::Filters::Max

Inherits:
Base
  • Object
show all
Defined in:
lib/queryko/filters/max.rb

Instance Attribute Summary

Attributes inherited from Base

#as, #column_name, #feature, #field, #query_object, #table_name

Instance Method Summary collapse

Methods inherited from Base

#build_field_from_column, #call, #initialize

Constructor Details

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

Instance Method Details

#intialize(options = {}, feature) ⇒ Object



4
5
6
# File 'lib/queryko/filters/max.rb', line 4

def intialize(options = {}, feature)
  super options, feature
end

#perform(collection, token, query_object) ⇒ Object



8
9
10
# File 'lib/queryko/filters/max.rb', line 8

def perform(collection, token, query_object)
  collection.where("#{table_name}.#{column_name} <= ?", token)
end