Avoid grouping user stats by archetype (filter happens beforehand)

This commit is contained in:
tms 2013-02-16 16:33:51 -05:00
parent 921c3f016f
commit b91ac45359
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ class UserAction < ActiveRecord::Base
results = UserAction.select("action_type, COUNT(*) count, '' AS description")
.joins(:target_topic)
.where(user_id: user_id)
.group('action_type', 'topics.archetype')
.group('action_type')
# should push this into the sql at some point, but its simple enough for now
unless guardian.can_see_private_messages?(user_id)