app/controllers/instance_configuration_controller.rb
# default value determines expected type
# raises TypeError if deserialization fails
default value determines expected type
raises TypeError if deserialization fails
default value determines expected type raises TypeError if deserialization fails
def deserialize(str, default_value)
    str = str.strip
    unless default_value.is_a? Array
      return convert_value(str, default_value.class)
    else
      return str.blank? ? [] : str.parse_csv.map do |item|
        item.strip!
        convert_value(item, default_value[0].class)
      end
    end
  end
def deserialize ( str , default_value ) str = str . strip unless default_value . is_a? Array return convert_value ( str , default_value . class ) else return str . blank? ? [ ] : str . parse_csv . map do | item | item . strip! convert_value ( item , default_value [ 0 ] . class ) end end end
default value determines expected type
raises TypeError if deserialization fails
default value determines expected type raises TypeError if deserialization fails
str
<not_specific>
default_value
<not_specific>