agoragames / leaderboard

Leaderboards backed by Redis in Ruby
https://rubygems.org/gems/leaderboard
MIT License
478 stars 65 forks source link

#members_from_rank_range not working properly for competition leaderboard #64

Open rrcdr opened 7 years ago

rrcdr commented 7 years ago

If I were to do leaderboard.members_from_rank_range(1, 1) I would expect to get all members who are rank 1 in a competition leaderboard. Instead I am just getting the first member in the leaderboard.

I would imagine the intended functionality of the method would be to return all members who are rank 1.

czarneckid commented 6 years ago

@rrcdr Apologies for getting to this so late. I'm not sure what's the correct thing to do here since for most use cases of this type of leaderboard, you're grabbing page by page from the leaderboard, after which we modify the rankings based on number of members in the leaderboard.