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 --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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. Patrick wrote:> 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--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 <patricksky852-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > 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 > > > > >-- Cheers! - Pratik http://m.onkey.org --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---