lib/multisert.rb in multisert-0.0.1 vs lib/multisert.rb in multisert-0.0.2

- old
+ new

@@ -66,15 +66,13 @@ }.join(",") end def cast value case value - when String - # TODO: want to escape the string too, checking for " and ; - "'#{value}'" - when Date - "'#{value}'" - else - value + # TODO: want to escape the string too, checking for " and ; + when String then "'#{value}'" + when Date then "'#{value.strftime("%Y-%m-%d")}'" + when Time then "'#{value.strftime("%Y-%m-%d %H:%M:%S")}'" + else value end end end