I have a league table that i create with:
QuizuserAnswer.all(:include =>:user, :select => 'user_id, SUM(answer) AS points', :group =>'user_id', :order=>'points DESC'
This returns an object like this:
=> [#<QuizuserAnswer user_id: 340>, #<QuizuserAnswer user_id: 348>]
Now i want to find the league table position of one specific user. Is there a clean way? or do i have to loop through al columns?