app/controllers/anoubis/etc/filter.rb
##
# Initializes where parameters for filed with type listbox.
# @param key [Symbol] Filed identifier
# @param value [String] Filter parameters
Initializes where parameters for filed with type listbox.
Initializes where parameters for filed with type listbox .
def init_data_listbox(key, value)
        values = []
        if value.class == Array
          value.each do |data|
            if self.fields[key].options.enum
              values.push self.fields[key].options.enum[data]
            else
              values.push data
            end
          end
        end
        if values.count > 0
          if self.fields[key].table_field.to_s.include? '.'
            self.attach_to_array self.fields[key].table_field.to_s + ' IN (?)'
            self.array.push(values)
          else
            self.hash[self.fields[key].table_field] = values
          end
        end
      end
def init_data_listbox ( key , value ) values = [ ] if value . class == Array value . each do | data | if self . fields [ key ] . options . enum values . push self . fields [ key ] . options . enum [ data ] else values . push data end end end if values . count > 0 if self . fields [ key ] . table_field . to_s . include? '.' self . attach_to_array self . fields [ key ] . table_field . to_s + ' IN (?)' self . array . push ( values ) else self . hash [ self . fields [ key ] . table_field ] = values end end end
Initializes where parameters for filed with type listbox.
Initializes where parameters for filed with type listbox .
key
None
value
None