lib/wice/columns/column_integer.rb
#:nodoc:
# Note: also used in ColumnRange, hence class method
:nodoc:
Note: also used in ColumnRange, hence class method
: nodoc : Note : also used in ColumnRange hence class method
def generate_conditions(table_alias, opts)   
        unless opts.is_a? Hash
          Wice.log 'invalid parameters for the grid integer filter - must be a hash'
          return false
        end
        conditions = [[]]
        if opts[:eq]
          op, num = get_op_and_value(opts[:eq])
          if op && num
            conditions[0] << " #{@column_wrapper.alias_or_table_name(table_alias)}.#{@column_wrapper.name} " + op + ' ? '
            conditions << num
          else
            opts.delete(:eq)
          end
        end
        if conditions.size == 1
          return false
        end
        conditions[0] = conditions[0].join(' and ')
        conditions
      end
def generate_conditions ( table_alias , opts ) unless opts . is_a? Hash Wice . log 'invalid parameters for the grid integer filter - must be a hash' return false end conditions = [ [ ] ] if opts [ :eq ] op , num = get_op_and_value ( opts [ :eq ] ) if op && num conditions [ 0 ] << " #{@column_wrapper.alias_or_table_name(table_alias)}.#{@column_wrapper.name} " + op + ' ? ' conditions << num else opts . delete ( :eq ) end end if conditions . size == 1 return false end conditions [ 0 ] = conditions [ 0 ] . join ( ' and ' ) conditions end
:nodoc:
Note: also used in ColumnRange, hence class method
: nodoc : Note : also used in ColumnRange hence class method
#:nodoc:
table_alias
opts