amatsuda/kaminari — pull request #194 by dblock (2012-01-11 18:48:34+00:00)
Title: Fixing displayed number of items on each page w/ Mongoid 2.4.x and MongoMapper.

The number of items on the current page broke in Mongoid 2.4 and looks broken with Mongomapper 0.10.1 (don't know since when). The Mongo Ruby driver takes a parameter to specify whether count should respect `:limit` or whether to return the count for the entire collection.

Introducing `current_page_count` that wraps `count` most of the time, except when count is more complicated.

Fixed specs to work with an actual mongodb database for both mongoid and mongo_mapper and removed the stubs that hid the pagination problem.