aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models
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/test/models
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/test/models')
-rw-r--r--activerecord/test/models/topic.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/models/topic.rb b/activerecord/test/models/topic.rb
index 75890c327a..0c8880a20e 100644
--- a/activerecord/test/models/topic.rb
+++ b/activerecord/test/models/topic.rb
@@ -99,7 +99,7 @@ class Topic < ActiveRecord::Base
end
def destroy_children
- self.class.where("parent_id = #{id}").delete_all
+ self.class.delete_by(parent_id: id)
end
def set_email_address