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??

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

  • Jeffrey L. Taylor at Mar 18, 2012 at 3:46 am

    Quoting Rogelio A. RogeX <lists@ruby-forum.com>:
    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??
    Look at the examples near the bottom of this page:
    https://github.com/mislav/will_paginate/wiki

    HTH,
    Jeffrey

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedMar 16, '12 at 7:14p
activeMar 18, '12 at 3:46a
posts2
users2
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2022 Grokbase