Class: Wice::FilterConditionsGeneratorDate

Inherits:
FilterConditionsGenerator show all
Defined in:
lib/filter_conditions_generators.rb

Overview

:nodoc:

Instance Method Summary collapse

Methods inherited from FilterConditionsGenerator

#initialize

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