diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2019-02-20 22:27:22 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-20 22:27:22 +0900 |
commit | ceed0aa2e0e45523496130e5a5c4a4f032e8cd2a (patch) | |
tree | 09b1dfbb51826921f83ffbeede9ddfbd295af267 /activerecord/lib/active_record/persistence.rb | |
parent | df2ebf9b59b8ef063923136ba7097328db6c949f (diff) | |
parent | 11c34d8ef44b95b3989cb8376af09842293c892c (diff) | |
download | rails-ceed0aa2e0e45523496130e5a5c4a4f032e8cd2a.tar.gz rails-ceed0aa2e0e45523496130e5a5c4a4f032e8cd2a.tar.bz2 rails-ceed0aa2e0e45523496130e5a5c4a4f032e8cd2a.zip |
Merge pull request #35327 from abhaynikam/use-delete-by-and-destroy-by-method
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.rb | 2 |
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: |