You can bring back the will_paginate Array extensions by requiring 'will_paginate/array' in your code. That gives you the helper methods and the view code.
Rob On Jul 6, 2012, at 10:32 AM, Benjamin Wanicur wrote: > I'm wondering if there is a Ruby/Rails library out there for generating > pagination links for a simple Array of Ruby objects. "Will Paginate" and > Kaminari (the two most popular pagination libraries ?) require that the > pagination object include methods like "total_pages" and "current_page". > Obviously an Array object does not respond to these methods. In addition, > these are full-fledged pagination libraries that handle the back-end, AR > work. > > Here is the situation I have in mind: > You are making requests against a web service API that supports pagination. > You are getting an Array of serialized JSON or XML objects back (along with > the other necessary pagination info). You would like some simple pagination > links generated with a handy view helper (like the "will_paginate" method). > > Does anyone know of a gem or library that would handle this situation ? > > Cheers > > Ben W > > -- > SD Ruby mailing list > [email protected] > http://groups.google.com/group/sdruby -- SD Ruby mailing list [email protected] http://groups.google.com/group/sdruby
