How do i use paginate in the class that i written

Hi ~

I am writing a class that is used to make a search to the model. It
has a method that return the result set of the search result and the
pagination class. But how can i use ‘paginate’ method in my class so
that i can pagintate the results? Is it need to use require or
include ?

Thank you ~
Patrick

Hi,
For this to work you have to use paginate_collection method which is
used for the collection we retrived from the model classes. Paginate
is usually used for only the model classes.

Thanks
Vishal.

Don’t use paginate() - it’s a deprecated method and removed in latest
edge rails.

Instead, use will_paginate() plugin - http://errtheblog.com/post/4791

On 8/3/07, Patrick [email protected] wrote:

Patrick


Cheers!