From 3ab2085e05ba80048c3561120241c3a13323c22f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Mon, 3 Jun 2019 16:43:42 +0200 Subject: [PATCH] Move calculate_ballot_lines task to the right file We already have a file with the proper budgets namespace. --- lib/tasks/budgets.rake | 7 +++++++ lib/tasks/regenerate_ballot_lines_cache.rake | 8 -------- 2 files changed, 7 insertions(+), 8 deletions(-) delete mode 100644 lib/tasks/regenerate_ballot_lines_cache.rake diff --git a/lib/tasks/budgets.rake b/lib/tasks/budgets.rake index c53c71103..4e2961198 100644 --- a/lib/tasks/budgets.rake +++ b/lib/tasks/budgets.rake @@ -1,4 +1,11 @@ namespace :budgets do + desc "Regenerate ballot_lines_count cache" + task calculate_ballot_lines: :environment do + Budget::Ballot.find_each do |ballot| + Budget::Ballot.reset_counters ballot.id, :lines + end + end + namespace :email do desc "Sends emails to authors of selected investments" diff --git a/lib/tasks/regenerate_ballot_lines_cache.rake b/lib/tasks/regenerate_ballot_lines_cache.rake deleted file mode 100644 index d008ec556..000000000 --- a/lib/tasks/regenerate_ballot_lines_cache.rake +++ /dev/null @@ -1,8 +0,0 @@ -namespace :budgets do - desc "Regenerate ballot_lines_count cache" - task calculate_ballot_lines: :environment do - Budget::Ballot.find_each do |ballot| - Budget::Ballot.reset_counters ballot.id, :lines - end - end -end