PERF: use 'delete_all' method instead of 'destroy_all'

This commit is contained in:
Vinoth Kannan 2019-04-19 18:00:01 +05:30
parent 5de483a1b9
commit ce8d30f667
1 changed files with 1 additions and 1 deletions

View File

@ -396,7 +396,7 @@ UPLOAD_PATTERNS ||= [
desc 'Finds missing post upload records from cooked HTML content' desc 'Finds missing post upload records from cooked HTML content'
task 'posts:missing_uploads' => :environment do task 'posts:missing_uploads' => :environment do
PostCustomField.where(name: Post::MISSING_UPLOADS).destroy_all PostCustomField.where(name: Post::MISSING_UPLOADS).delete_all
count = 0 count = 0
Post.have_uploads.select(:id, :cooked).find_in_batches do |posts| Post.have_uploads.select(:id, :cooked).find_in_batches do |posts|