1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Remove PG's definition of type_cast

All cases except for `nil` in an array have been removed. `nil` in an
array is handled by the Array type object.
This commit is contained in:
Sean Griffin 2014-07-06 13:43:33 -06:00
parent 2f716694f2
commit 57beebaade

View file

@ -43,21 +43,6 @@ module ActiveRecord
end end
end end
def type_cast(value, column)
return super unless column
case value
when NilClass
if column.array
value
else
super
end
else
super
end
end
# Quotes strings for use in SQL input. # Quotes strings for use in SQL input.
def quote_string(s) #:nodoc: def quote_string(s) #:nodoc:
@connection.escape(s) @connection.escape(s)