aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/topic.rb
diff options
context:
space:
mode:
authorWojciech Wnętrzak <w.wnetrzak@gmail.com>2015-09-05 10:50:05 +0200
committerWojciech Wnętrzak <w.wnetrzak@gmail.com>2015-09-06 16:14:16 +0200
commitc82c5f8ffd7291186235c5912151c9dc0d262c4a (patch)
treee881e9d357f4368158e03724cb241265c717f8ae /activerecord/test/models/topic.rb
parenta8f4568f5396b68ae81eddc636604bb78bb6632a (diff)
downloadrails-c82c5f8ffd7291186235c5912151c9dc0d262c4a.tar.gz
rails-c82c5f8ffd7291186235c5912151c9dc0d262c4a.tar.bz2
rails-c82c5f8ffd7291186235c5912151c9dc0d262c4a.zip
Deprecate passing conditions to AR::Relation destroy_all and delete_all methods
Diffstat (limited to 'activerecord/test/models/topic.rb')
-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 d17270021a..176bc79dc7 100644
--- a/activerecord/test/models/topic.rb
+++ b/activerecord/test/models/topic.rb
@@ -86,7 +86,7 @@ class Topic < ActiveRecord::Base
end
def destroy_children
- self.class.delete_all "parent_id = #{id}"
+ self.class.where("parent_id = #{id}").delete_all
end
def set_email_address