kytrinyx/exercism.io — pull request #589 by tevanoff (2013-08-21 02:05:29+00:00)
Title: Adding pagination to the gallery page.

Fixes #532

Ok, I originally wanted to use Kaminari since it has a released version with Mongoid support, but Sinatra and Kaminari are currently not getting along -- they both require conflicting versions of Rack.

So I went with will_paginate, but the one caveat is that I had to pull it from master because the Mongoid support has not seen an official release yet. If that's an issue let me know and I can figure something else out. Also, there's a second gem in there to make the pagination view helper format itself for bootstrap.

There also was not a test for the gallery routes, so I added a really basic one just to run through the method I added pagination to, and it required some stubbing. It seemed kind of difficult to create all the objects necessary for really testing that page (users and submissions and exercises and trails and...), but if I missed an easy way to do that let me know and I can fill that in.

Cheers!