提交 c490f86e 编写于 作者: R Ryuta Kamizono

Don't use deprecated `column` in the error message

上级 8eb940b1
......@@ -29,9 +29,6 @@ def type_cast(value, column = nil)
end
_type_cast(value)
rescue TypeError
to_type = column ? " to #{column.type}" : ""
raise TypeError, "can't cast #{value.class}#{to_type}"
end
# If you are having to call this function, you are likely doing something
......@@ -236,7 +233,7 @@ def _type_cast(value)
when nil, Numeric, String then value
when Type::Time::Value then quoted_time(value)
when Date, Time then quoted_date(value)
else raise TypeError
else raise TypeError, "can't cast #{value.class.name}"
end
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册