Skip to content

Commit

Permalink
Should take integer regardless of case...
Browse files Browse the repository at this point in the history
  • Loading branch information
d-m-u committed Oct 24, 2018
1 parent 772119d commit 2f1338c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ def self.convert_value_based_on_datatype(value, datatype)
return false if datatype == 'FalseClass'
return Time.parse(value) if datatype == 'time' || datatype == 'Time'
return value.to_sym if datatype == 'symbol' || datatype == 'Symbol'
return value.to_i if datatype == 'integer' || datatype == 'Fixnum'
return value.to_i if %w(integer Integer Fixnum).include?(datatype)
return value.to_f if datatype == 'float' || datatype == 'Float'
return value.gsub(/[\[\]]/, '').strip.split(/\s*,\s*/) if datatype == 'array' && value.class == String
return decrypt_password(value) if datatype == 'password'
Expand Down

0 comments on commit 2f1338c

Please sign in to comment.