Class: Wice::FilterConditionsGeneratorDate
- Inherits:
-
FilterConditionsGenerator
- Object
- FilterConditionsGenerator
- Wice::FilterConditionsGeneratorDate
- Defined in:
- lib/filter_conditions_generators.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#generate_conditions(opts) ⇒ Object
:nodoc:.
Methods inherited from FilterConditionsGenerator
Constructor Details
This class inherits a constructor from Wice::FilterConditionsGenerator
Instance Method Details
#generate_conditions(opts) ⇒ Object
:nodoc:
120 121 122 123 124 |
# File 'lib/filter_conditions_generators.rb', line 120 def generate_conditions(opts) #:nodoc: @criteria.where(@field.name.to_sym.gt => opts[:fr]) if opts[:fr] @criteria.where(@field.name.to_sym.lt => opts[:to]) if opts[:to] opts[:fr] || opts[:to] end |