aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/topic.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/models/topic.rb')
-rw-r--r--activerecord/test/models/topic.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/activerecord/test/models/topic.rb b/activerecord/test/models/topic.rb
index 75890c327a..77101090f2 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
@@ -119,10 +119,6 @@ class Topic < ActiveRecord::Base
end
end
-class ImportantTopic < Topic
- serialize :important, Hash
-end
-
class DefaultRejectedTopic < Topic
default_scope -> { where(approved: false) }
end