app/models/admin_configuration.rb
# converter to return requested value as an instance of its value type
# numerics will return an interger or float depending on value contents (also understands Rails shorthands for byte size increments)
# booleans return true/false based on matching a variety of possible 'true' values
# strings just return themselves
converter to return requested value as an instance of its value type
numerics will return an interger or float depending on value contents (also understands Rails shorthands for byte size increments)
booleans return true/false based on matching a variety of possible 'true' values
strings just return themselves
converter to return requested value as an instance of its value type numerics will return an interger or float depending on value contents ( also understands Rails shorthands for byte size increments ) booleans return true / false based on matching a variety of possible ' true ' values strings just return themselves
def convert_value_by_type
    case self.value_type
      when 'Numeric'
        self.value.include?('.') ? self.value.to_f : self.value.to_i
      when 'Boolean'
        return self.value == '1'
      else
        return self.value
    end
  end
def convert_value_by_type case self . value_type when 'Numeric' self . value . include? ( '.' ) ? self . value . to_f : self . value . to_i when 'Boolean' return self . value == '1' else return self . value end end
converter to return requested value as an instance of its value type
numerics will return an interger or float depending on value contents (also understands Rails shorthands for byte size increments)
booleans return true/false based on matching a variety of possible 'true' values
strings just return themselves
converter to return requested value as an instance of its value type numerics will return an interger or float depending on value contents ( also understands Rails shorthands for byte size increments ) booleans return true / false based on matching a variety of possible ' true ' values strings just return themselves