Sha256: bc73948b9e3790bc84cef19496ba8fb37a9ab0cdf2091cac4c36801f5aa3cfbf
Contents?: true
Size: 721 Bytes
Versions: 18
Compression:
Stored size: 721 Bytes
Contents
module Wice module Columns #:nodoc: module CommonRailsDateDatetimeConditionsGeneratorMixin #:nodoc: def generate_conditions(table_alias, opts) #:nodoc: conditions = [[]] if opts[:fr] conditions[0] << " #{@column_wrapper.alias_or_table_name(table_alias)}.#{@column_wrapper.name} >= ? " conditions << opts[:fr].to_date end if opts[:to] conditions[0] << " #{@column_wrapper.alias_or_table_name(table_alias)}.#{@column_wrapper.name} <= ? " conditions << (opts[:to].to_date + 1) end return false if conditions.size == 1 conditions[0] = conditions[0].join(' and ') conditions end end end end
Version data entries
18 entries across 18 versions & 2 rubygems