From 84eac6ff68d2f0af48669fd881f822fd2914162a Mon Sep 17 00:00:00 2001 From: Bertocq Date: Tue, 24 Oct 2017 01:39:57 +0200 Subject: [PATCH] Correct booth valid and total participants calculations --- app/models/poll/stats.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/poll/stats.rb b/app/models/poll/stats.rb index d7735456f..fe9560c34 100644 --- a/app/models/poll/stats.rb +++ b/app/models/poll/stats.rb @@ -31,7 +31,7 @@ class Poll end def total_participants_booth - stats_cache("total_participants_booth") { voters.where(origin: "booth").count } + stats_cache("total_participants_booth") { total_booth_valid + total_booth_white + total_booth_null } end def total_participants_booth_percentage