From 8c8dc3946572ebb35a20b9fa4244c5bb7e3b531d Mon Sep 17 00:00:00 2001 From: rebuilt Date: Wed, 21 Dec 2022 11:22:54 -0800 Subject: [PATCH] Also delete response rates for non lowell schools --- lib/tasks/data.rake | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/tasks/data.rake b/lib/tasks/data.rake index 118c3afc..9f4e7fa3 100644 --- a/lib/tasks/data.rake +++ b/lib/tasks/data.rake @@ -72,6 +72,7 @@ namespace :data do desc 'delete non-lowell schools and districts' task delete_non_lowell: :environment do schools = School.all.reject { |s| s.district.name == 'Lowell' } + ResponseRate.where(school: schools).delete_all Respondent.where(school: schools).delete_all Survey.where(school: schools).delete_all schools.each { |school| school.delete }