Skip to content

Commit d5902c9

Browse files
committed
Revert deprecation of sanitize_sql_hash_for_assignment
This method is still used by `update_all`
1 parent eb92100 commit d5902c9

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

activerecord/CHANGELOG.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
* Deprecate `sanitize_sql_hash_for_conditions` and
2-
`sanitize_sql_hash_for_assignment` without replacement. Using a `Relation`
3-
for performing queries and updates is the prefered API.
1+
* Deprecate `sanitize_sql_hash_for_conditions` without replacement. Using a
2+
`Relation` for performing queries and updates is the prefered API.
43

54
*Sean Griffin*
65

activerecord/lib/active_record/sanitization.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,6 @@ def sanitize_sql_hash_for_conditions(attrs, default_table_name = self.table_name
104104
# { status: nil, group_id: 1 }
105105
# # => "status = NULL , group_id = 1"
106106
def sanitize_sql_hash_for_assignment(attrs, table)
107-
ActiveSupport::Deprecation.warn(<<-EOWARN)
108-
sanitize_sql_hash_for_assignment is deprecated, and will be removed in Rails 5.0
109-
EOWARN
110107
c = connection
111108
attrs.map do |attr, value|
112109
"#{c.quote_table_name_for_assignment(table, attr)} = #{quote_bound_value(value, c, columns_hash[attr.to_s])}"

0 commit comments

Comments
 (0)