Open xofred opened 5 years ago
Let's say we have a leaderboard with 2 pages, leaders(3) will return page 2 contents, which is confusing.
leaders(3)
https://github.com/agoragames/leaderboard/blob/master/lib/leaderboard.rb#L714
if current_page > total_pages_in(leaderboard_name, page_size) current_page = total_pages_in(leaderboard_name, page_size) end
I think, if something are not exist, should return empty array, like kaminari or other APIs design.
If it's design on purpose, maybe README should make this behavior clearly.
ps: Love your games since Facebook and Flash age. Thank you guys for the great works! And pardon my poor English.
Let's say we have a leaderboard with 2 pages,
leaders(3)
will return page 2 contents, which is confusing.https://github.com/agoragames/leaderboard/blob/master/lib/leaderboard.rb#L714
I think, if something are not exist, should return empty array, like kaminari or other APIs design.
If it's design on purpose, maybe README should make this behavior clearly.
ps: Love your games since Facebook and Flash age. Thank you guys for the great works! And pardon my poor English.