Closed stephenmckinney closed 12 years ago
Thanks for the quick reply and great gem.
If your values are going to be solely integers, it's possible you could use something along the lines of score.timestamp as proposed in this thread.
Thanks, but in this case the scores are floats. This tie situation mattered most for us when we needed to decide the winners of a leaderboard. So we decided on this:
def winners(options = {})
leaders = leaders(1, options)
leaders.take_while { |x| x[:score] == leaders.first[:score] }
end
This could be more of a question then a bug, but with the below members, why wouldn't the ranking be: 1, 2, 2, 4 due to a tie?