A user has_many badges through badge_awardings
I can do
@user.badges.count(:group => 'badges.id')
Which returns a hash of ids and counts like this
{1=>2, 2=>1, 5=>1, 8=>1}
But then I have to find the badges again individually to display them.
Is there anyway of returning a hash of badges and their counts?
You can get the badges in another step: