aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorSean Griffin <sean@thoughtbot.com>2014-11-02 13:52:34 -0700
committerSean Griffin <sean@thoughtbot.com>2014-11-02 13:52:34 -0700
commitd5902c9e7eaba4db4e79c464d623a7d7e6e2d0e3 (patch)
treedb76da86c8b783ef3c41f4025d9d2e8e530b0e48 /activerecord
parenteb921000a11bc87a3b001164fc367b84aee584c5 (diff)
downloadrails-d5902c9e7eaba4db4e79c464d623a7d7e6e2d0e3.tar.gz
rails-d5902c9e7eaba4db4e79c464d623a7d7e6e2d0e3.tar.bz2
rails-d5902c9e7eaba4db4e79c464d623a7d7e6e2d0e3.zip
Revert deprecation of `sanitize_sql_hash_for_assignment`
This method is still used by `update_all`
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/CHANGELOG.md5
-rw-r--r--activerecord/lib/active_record/sanitization.rb3
2 files changed, 2 insertions, 6 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index 5404465b4c..f7ca41908d 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,6 +1,5 @@
-* Deprecate `sanitize_sql_hash_for_conditions` and
- `sanitize_sql_hash_for_assignment` without replacement. Using a `Relation`
- for performing queries and updates is the prefered API.
+* Deprecate `sanitize_sql_hash_for_conditions` without replacement. Using a
+ `Relation` for performing queries and updates is the prefered API.
*Sean Griffin*
diff --git a/activerecord/lib/active_record/sanitization.rb b/activerecord/lib/active_record/sanitization.rb
index d80b516c67..6a130c145b 100644
--- a/activerecord/lib/active_record/sanitization.rb
+++ b/activerecord/lib/active_record/sanitization.rb
@@ -104,9 +104,6 @@ sanitize_sql_hash_for_conditions is deprecated, and will be removed in Rails 5.0
# { status: nil, group_id: 1 }
# # => "status = NULL , group_id = 1"
def sanitize_sql_hash_for_assignment(attrs, table)
- ActiveSupport::Deprecation.warn(<<-EOWARN)
-sanitize_sql_hash_for_assignment is deprecated, and will be removed in Rails 5.0
- EOWARN
c = connection
attrs.map do |attr, value|
"#{c.quote_table_name_for_assignment(table, attr)} = #{quote_bound_value(value, c, columns_hash[attr.to_s])}"