app/controllers/anoubis/etc/field.rb
##
# Generates hash representation of all class parameters,
# @return [Hash] hash representation of all data
Generates hash representation of all class parameters.
Generates hash representation of all class parameters .
def to_h
        result = {
            key: self.key,
            type: self.type,
            visible: self.visible,
            field: self.field,
            table_field: self.table_field,
            error_text: self.error_text,
            autocomplete: self.autocomplete
        }
        result[:format] = self.format if self.type == 'datetime'
        if self.editable
          result[:editable] = self.editable
          result[:field] = self.model.title if self.model
        else
          result[:editable] = self.editable if self.editable != nil
        end
        if self.model
          result[:model] = self.model.to_h
        end
        if self.options
          result[:options] = self.options.to_h
        end
        if self.order
          result[:order] = self.order.to_h
        end
        result
      end
def to_h result = { key : self . key , type : self . type , visible : self . visible , field : self . field , table_field : self . table_field , error_text : self . error_text , autocomplete : self . autocomplete } result [ :format ] = self . format if self . type == 'datetime' if self . editable result [ :editable ] = self . editable result [ :field ] = self . model . title if self . model else result [ :editable ] = self . editable if self . editable != nil end if self . model result [ :model ] = self . model . to_h end if self . options result [ :options ] = self . options . to_h end if self . order result [ :order ] = self . order . to_h end result end
Generates hash representation of all class parameters,
Generates hash representation of all class parameters
hash representation of all data
hash representation of all data
Hash