aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/persistence.rb
diff options
context:
space:
mode:
authorAbhay Nikam <nikam.abhay1@gmail.com>2019-02-19 21:10:53 +0530
committerAbhay Nikam <nikam.abhay1@gmail.com>2019-02-20 09:19:19 +0530
commit11c34d8ef44b95b3989cb8376af09842293c892c (patch)
treecc169fd1045bc1862f415fded1bf59e6e7359d9c /activerecord/lib/active_record/persistence.rb
parent64ef5e2f9e854a7f988227d629a699f11a998b17 (diff)
downloadrails-11c34d8ef44b95b3989cb8376af09842293c892c.tar.gz
rails-11c34d8ef44b95b3989cb8376af09842293c892c.tar.bz2
rails-11c34d8ef44b95b3989cb8376af09842293c892c.zip
Replaced usage of where.delete/destroy_all with delete/destroy_by
Diffstat (limited to 'activerecord/lib/active_record/persistence.rb')
-rw-r--r--activerecord/lib/active_record/persistence.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/persistence.rb b/activerecord/lib/active_record/persistence.rb
index 510a275b4e..7763496519 100644
--- a/activerecord/lib/active_record/persistence.rb
+++ b/activerecord/lib/active_record/persistence.rb
@@ -161,7 +161,7 @@ module ActiveRecord
# # Delete multiple rows
# Todo.delete([2,3,4])
def delete(id_or_array)
- where(primary_key => id_or_array).delete_all
+ delete_by(primary_key => id_or_array)
end
def _insert_record(values) # :nodoc: