From e5ec0bf6bbb841f3331495937d4aae79b4dba5c3 Mon Sep 17 00:00:00 2001 From: rgarcia Date: Fri, 30 Jun 2017 23:48:18 +0200 Subject: [PATCH] counts votes instead of ballots --- app/models/budget/stats.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/budget/stats.rb b/app/models/budget/stats.rb index 338b28fd1..643c4fda0 100644 --- a/app/models/budget/stats.rb +++ b/app/models/budget/stats.rb @@ -31,7 +31,7 @@ class Budget end def total_votes - stats_cache("total_votes") { @budget.ballots.count } + stats_cache("total_votes") { @budget.ballots.map(&:lines).count } end def total_selected_investments