Class: BMC::Filter::ByDateEnd

Inherits:
ByKeyValue show all
Defined in:
app/filters/bmc/filter/by_date_end.rb

Instance Attribute Summary

Attributes inherited from ByKeyValue

#key

Instance Method Summary collapse

Methods inherited from ByKeyValue

#column_for, #initialize

Constructor Details

This class inherits a constructor from BMC::Filter::ByKeyValue

Instance Method Details

#call(query, value) ⇒ Object



2
3
4
5
6
# File 'app/filters/bmc/filter/by_date_end.rb', line 2

def call(query, value)
  value = Date.parse(value)
  column = column_for(query)
  query.where("#{column} <= ?", value)
end