lib/riddle/query/insert.rb in riddle-1.5.3 vs lib/riddle/query/insert.rb in riddle-1.5.4
- old
+ new
@@ -36,12 +36,14 @@
end
def translated_value(value)
case value
when String
- "'#{value}'"
+ "'#{value.gsub(/['\\]/, '').gsub(/\s+/, ' ')}'"
when TrueClass, FalseClass
value ? 1 : 0
+ when Time
+ value.to_i
else
value
end
end
end