mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Deprecate passing a column to quote
It's only used to grab the type for type casting purposes, and we would like to remove the type from the columns entirely.
This commit is contained in:
parent
ac6e6545de
commit
7bb6208697
1 changed files with 6 additions and 0 deletions
|
@ -10,6 +10,12 @@ module ActiveRecord
|
||||||
return value.quoted_id if value.respond_to?(:quoted_id)
|
return value.quoted_id if value.respond_to?(:quoted_id)
|
||||||
|
|
||||||
if column
|
if column
|
||||||
|
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
||||||
|
Passing a column to `quote` has been deprecated. It is only used
|
||||||
|
for type casting, which should be handled elsewhere. See
|
||||||
|
https://github.com/rails/arel/commit/6160bfbda1d1781c3b08a33ec4955f170e95be11
|
||||||
|
for more information.
|
||||||
|
MSG
|
||||||
value = column.cast_type.type_cast_for_database(value)
|
value = column.cast_type.type_cast_for_database(value)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue