Skip to content

Commit

Permalink
[DEMAD-421] Rake ballot_lines_calculate
Browse files Browse the repository at this point in the history
  • Loading branch information
vanessasotob committed Jul 11, 2022
1 parent 1018216 commit f94a238
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/tasks/budget_stats.rake
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,13 @@ namespace :budgets do

end

desc "Calcular ballot_lines_count"
task ballot_lines_count: :environment do
Budget.find(5).ballots.each do |b|
b.ballot_lines_count = b.lines.blank? ? 0 : b.lines.count
b.save(validate: false)
end
end


end
Expand Down

0 comments on commit f94a238

Please sign in to comment.