From 11c34d8ef44b95b3989cb8376af09842293c892c Mon Sep 17 00:00:00 2001 From: Abhay Nikam Date: Tue, 19 Feb 2019 21:10:53 +0530 Subject: Replaced usage of where.delete/destroy_all with delete/destroy_by --- activerecord/test/models/topic.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/test') 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 -- cgit v1.2.3