Forum: Ruby on Rails Accessing paginate extras attributes or methods for parsing

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
mathieu.chappuis.lists (Guest)
on 2005-12-08 17:21
(Received via mailing list)

I paginate records using a medium complex query with :conditions :

like  id in (select ....) and id in (select ..)

Because that query is very high cost in time and ressources I'aint to
additionnals queries for counting or else.

Once one record is displayed, how access the next id in the paginated
collection, w/o querying again just for next id  ?

Like :

id   name
45  bob
47  bill
98  rob
78  david

In displaying rob's record (/show/98) i'll like to have Next and

Thanks ,
vanek (Guest)
on 2005-12-08 18:39
(Received via mailing list)
In your paginate query pull down 1 more record than you display
just so you know its "Next" ID.
This topic is locked and can not be replied to.