提交 9c9f450e 编写于 作者: V Vishnu Atrai

require 'time'

上级 4fe6d01a
require 'time'
require 'active_support/core_ext/module/delegation'
require 'active_support/core_ext/string/inflections'
......@@ -56,7 +57,7 @@ def content_type
PARSING = {
"symbol" => Proc.new { |symbol| symbol.to_sym },
"date" => Proc.new { |date| ::Date.parse(date) },
"datetime" => Proc.new { |time| ::Time.xmlschema(time).utc rescue ::DateTime.parse(time).utc },
"datetime" => Proc.new { |time| Time.xmlschema(time).utc rescue ::DateTime.parse(time).utc },
"integer" => Proc.new { |integer| integer.to_i },
"float" => Proc.new { |float| float.to_f },
"decimal" => Proc.new { |number| BigDecimal(number) },
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册