From aa5a1eca6ff2c04f7424f32e9ebc8ab4369bd7da Mon Sep 17 00:00:00 2001 From: r888888888 Date: Thu, 11 May 2017 15:59:40 -0700 Subject: [PATCH] fixes #3035 --- app/models/post_disapproval.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/post_disapproval.rb b/app/models/post_disapproval.rb index 052764503..650282e4a 100644 --- a/app/models/post_disapproval.rb +++ b/app/models/post_disapproval.rb @@ -13,7 +13,7 @@ class PostDisapproval < ActiveRecord::Base scope :disinterest, lambda {where(:reason => ["disinterest", "legacy"])} def self.prune! - PostDisapproval.destroy_all(["created_at < ?", DELETION_THRESHOLD.ago]) + PostDisapproval.where("post_id in (select _.post_id from post_disapprovals _ where _.created_at < ?)", DELETION_THRESHOLD.ago) end def self.dmail_messages! @@ -28,7 +28,7 @@ class PostDisapproval < ActiveRecord::Base Dmail.create_automated( :to_id => uploader.id, - :title => "Some of your uploads have been critiqued by the moderators", + :title => "Someone has commented on your uploads", :body => message ) end