couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From J Chris Anderson <>
Subject Re: WillPaginate compatible pagination for CouchPotato views (Ruby)
Date Fri, 30 Jul 2010 19:38:01 GMT

On Jul 29, 2010, at 10:51 PM, Karel Minařík wrote:

> Hi Chris,
> thanks for the feedback. I am well aware of the shortcoming. Two reasons, mainly:
> a) I had the code ready from previous implementation for the RelaxDB gem.
> b) I had not enough time to figure out/translate the abstract description from the recipe
into code. Moreover, will_paginate depends on the "Jump to Page" functionality [].
As far as I understand it, that's explicitely explained as impossible with the "correct" solution
as presented in recipe?

Jump to page is impractical at scale. You see that Gmail and Google search don't offer explicit

You can however, jump by natural key (so you can jump to May 5th, or whatever) which I think
is more useful than jump to page 14.


> Karel
> On 29.Jul, 2010, at 19:04 , Chris Anderson wrote:
>> Why not use the linked list style  pagination described also in that recipe? The
problem with the skip approach is that the 1000th page will take a long time to load (and
potentially disrupt database performance for other queries). I'm not sure what advantage the
approach you take gives over the proper solution.
>> Sent from my iPhone
>> On Jul 29, 2010, at 7:01 AM, Karel Minařík <> wrote:
>>> Hi,
>>> I've recently needed will_paginate []
pagination for CouchPotato [] views.
>>> You can get the WillPaginate adapter from the following Gist:
>>> -->
>>> Tests are included in-file. Note that it uses the non-recommended, "slow" method
of pagination as described in the relax book (
Feedback is appreciated.
>>> Karel
>>> --

View raw message