From 9eb36b05108e538b629d8746f16e508edb0cf35e Mon Sep 17 00:00:00 2001 From: Jared Cosulich Date: Sun, 28 Jul 2019 21:14:25 -0400 Subject: [PATCH] sync school aggregates --- lib/tasks/data.rake | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/tasks/data.rake b/lib/tasks/data.rake index 5e8ba4c4..94aa4f37 100644 --- a/lib/tasks/data.rake +++ b/lib/tasks/data.rake @@ -564,7 +564,7 @@ namespace :data do task sync: :environment do sync_school_category_aggregates - Recipient.created_in(@year).each { |r| r.update_counts } + # Recipient.created_in(@year).each { |r| r.update_counts } end desc 'Create School Questions' @@ -904,3 +904,12 @@ end # end # end # end + +# Question.created_in(2019).each do |question| +# previous_year_question = Question.created_in(2018).find_by_external_id(question.external_id) +# if previous_year_question.nil? +# puts("No previous year question: #{question.external_id}") +# previous_year_question = Question.created_in(2018).find_by_external_id("s-peff-q6") +# end +# question.update(category: previous_year_question.category) +# end