app/controllers/anoubis/etc/filter.rb
##
# Initializes all where parameters according by data and fields.
# @param data [Hash] Collection of filter parameters in format <i>field: value</i>
Initializes all where parameters according by data and fields.
Initializes all where parameters according by data and fields .
def init_data(data = nil)
        self.data = if data then data else {} end
        if self.fields
          self.fields.each do |key, field|
            if self.data.key? key.to_s
              proc = format('init_data_%s', field.type)
              result = self.send proc, key, self.data[key.to_s]
            end
          end
        end
      end
def init_data ( data = nil ) self . data = if data then data else { } end if self . fields self . fields . each do | key , field | if self . data . key? key . to_s proc = format ( 'init_data_%s' , field . type ) result = self . send proc , key , self . data [ key . to_s ] end end end end
Initializes all where parameters according by data and fields.
Initializes all where parameters according by data and fields .
data
Collection of filter parameters in format field: value
Collection of filter parameters in format field : value