Paginate a table

Hi, I am try paginate a table with plugin WillPaginate, but according to
me I can only paginate as following:

//make a query,
data = Model.paginate(:per_page => 5)…

//Show paginate
<%= WillPaginate @data%

And I need paginate so:

obj1 = Model1.find()…
obj2 = Model2.find()…

obj3 = obj1-obj2

<% WillPaginate obj3 %>

Its possible use the plugin for paginate a object in memory??

Quoting Rogelio A. RogeX [email protected]:

obj1 = Model1.find()…
obj2 = Model2.find()…

obj3 = obj1-obj2

<% WillPaginate obj3 %>

Its possible use the plugin for paginate a object in memory??

Look at the examples near the bottom of this page:
https://github.com/mislav/will_paginate/wiki

HTH,
Jeffrey

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs