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:
parent
2f716694f2
commit
57beebaade
1 changed files with 0 additions and 15 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue