toptal/chewy — pull request #31 by leemhenson (2014-06-13 11:42:15+00:00)
Title: Use of ```#load``` with Kaminari pagination breaks on pages >= 2

The use of ```paginate_array``` in ```Loading#load``` is breaking clients because it causes Kaminari to repaginate the array it is being given. For any page other than the first, this will always be empty, so you can never ```load``` a page of query results besides the first.

* The first commit in this pull request adds a couple of specs to demonstrate the problem.
* The second fixes those spec failures.
* The third commit fixes a newly broken spec failure. This probably requires discussion - now that ```load``` is not returning a Kaminari ```PaginatableArray``` you do not get access to methods like ```total_count```. I think that's an acceptable tradeoff, but if you still wanted to support those you'd probably have to created some sort of ```PaginatedArray``` class which quacks the right way.