A platform for community discussion. Free, open, simple.
PERF: use 'delete_all' method instead of 'destroy_all'
Vinoth Kannance8d30f667ec
diff --git a/lib/tasks/posts.rake b/lib/tasks/posts.rakeindex f8cf44ecf93..9f612a55a1b 100644--- a/lib/tasks/posts.rake+++ b/lib/tasks/posts.rake@@ -396,7 +396,7 @@ UPLOAD_PATTERNS ||= [desc 'Finds missing post upload records from cooked HTML content'task 'posts:missing_uploads' => :environment do- PostCustomField.where(name: Post::MISSING_UPLOADS).destroy_all+ PostCustomField.where(name: Post::MISSING_UPLOADS).delete_allcount = 0Post.have_uploads.select(:id, :cooked).find_in_batches do |posts|