From 59c399c50a90b96422a2396196110f76eaa49d1b Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 16 Jul 2014 16:21:46 +1000 Subject: [PATCH] FIX: count distinct badges for totals. --- app/models/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index 574152f564d..e3973089c59 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -492,7 +492,7 @@ class User < ActiveRecord::Base end def badge_count - user_badges.count + user_badges.select('distinct badge_id').count end def featured_user_badges