app/controllers/anoubis/etc/filter.rb
##
# Initializes where parameters for filed with type 'datetime'.
# @param key [Symbol] Filed identifier
# @param value [String] Filter parameters
Initializes where parameters for filed with type 'datetime'.
Initializes where parameters for filed with type ' datetime ' .
def init_data_datetime(key, value)
        if value.class == Array
          if value.count == 2
            begin
              from = Time.parse value[0]
              to = Time.parse value[1]
            rescue
              from = nil
              to = nil
            end
            if from && to
              self.hash[key] = [ from..to ]
            end
          end
        end
      end
def init_data_datetime ( key , value ) if value . class == Array if value . count == 2 begin from = Time . parse value [ 0 ] to = Time . parse value [ 1 ] rescue from = nil to = nil end if from && to self . hash [ key ] = [ from .. to ] end end end end
Initializes where parameters for filed with type 'datetime'.
Initializes where parameters for filed with type ' datetime ' .
#words = value.split(' ') #        words.each do |word| #          if self.array.count == 0 #            self.array.push(self.fields[key].table_field.to_s + ' LIKE ?') #          else #            self.array[0] += ' AND '+self.fields[key].table_field.to_s+' LIKE ?' #          end #          self.array.push("%#{word}%") #        end
key
None
value
None