ruby: Fix boolean convertion on json to model attribute.

Current code will converts boolean true of json to false
because ruby's boolean is not matched with any regex.
This commit is contained in:
Tatsuki Sugiura 2016-02-10 15:06:31 +09:00
parent 3ba4cd1409
commit a442e1a60d

View File

@ -31,7 +31,7 @@
when :Float
value.to_f
when :BOOLEAN
if value =~ /^(true|t|yes|y|1)$/i
if value.to_s =~ /^(true|t|yes|y|1)$/i
true
else
false