couchrest/couchrest_model — pull request #127 by raldred (2011-11-08 17:17:52+00:00)
Title: Fix for pagination num_pages and range queries on compound indexes

Fixes #126 issue with View#num_pages returning incorrect values with range queries on compound indexes.
Causing pagination to misbehave.

Now using View#length instead of View#count to get the total rows in the result set.

Please cherry-pick [70a83369] and [9ece48bf]