Move calculate_ballot_lines task to the right file

We already have a file with the proper budgets namespace.
This commit is contained in:
Javi Martín
2019-06-03 16:43:42 +02:00
parent 685c96c40d
commit 3ab2085e05
2 changed files with 7 additions and 8 deletions

View File

@@ -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"

View File

@@ -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