abacha/puzzlenode — comment on commit 493c848c4d9d92a3c10b3eb8b37e1513eee681c5
File: app/models/user.rb line 76
By jordanbyron:

The trick I found in my implementation was only applying the limit if it is provided, that way we can get the sql code without a limit, allowing us to get the rank for any user in the database. You shouldn't need to change `User.leaderboard` much. Just add `rank()` to `User.select(" ...")`