Class: Filterameter::Filters::MaximumFilter

Inherits:
ArelFilter
  • Object
show all
Defined in:
lib/filterameter/filters/maximum_filter.rb

Overview

# Maximum Filter

Class MaximumFilter adds criteria for all values greater than or equal to a maximum.

Instance Attribute Summary

Attributes included from Errors

#errors

Instance Method Summary collapse

Methods inherited from ArelFilter

#initialize

Methods included from Errors

#valid?

Constructor Details

This class inherits a constructor from Filterameter::Filters::ArelFilter

Instance Method Details

#apply(query, value) ⇒ Object



9
10
11
# File 'lib/filterameter/filters/maximum_filter.rb', line 9

def apply(query, value)
  query.where(@arel_attribute.lteq(value))
end