Hello, I have my own functions in the controller and i want to use will paginate. when i use will paginate then i face the following problems, 1.I cannot sort the commplete results after search...i can only sort the results that are there on a particular page but not the whole set of results. 2. Since i am using my own defined functions in the controller clicking on the next page in will_paginate takes me to a controller action (i think index or show) which in my application has nothing to do with searching..so i get an error. What do i need to do Thank you. -- 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-/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 -~----------~----~----~----~------~----~------~--~---
On Sat, Jan 3, 2009 at 10:06 AM, Ank Ag <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>wrote:> > Hello, > I have my own functions in the controller and i want to use will > paginate. > when i use will paginate then i face the following problems, > 1.I cannot sort the commplete results after search...i can only sort the > results that are there on a particular page but not the whole set of > results. > > 2. Since i am using my own defined functions in the controller clicking > on the > next page in will_paginate takes me to a controller action (i think > index or show) which in my application has nothing to do with > searching..so i get an error. > What do i need to do > Thank you.Hi, what does your user defined function do that the conditions has doesn''t do? In any case, here''s a good Railscast that handles this very nicely: http://railscasts.com/episodes/51 Good luck, -Conrad --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Quoting Ank Ag <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>:> > Hello, > I have my own functions in the controller and i want to use will > paginate. > when i use will paginate then i face the following problems, > 1.I cannot sort the commplete results after search...i can only sort the > results that are there on a particular page but not the whole set of > results. >See http://mislav.uniqpath.com/static/will_paginate/doc/ and click on the WillPaginate::Collection link on the left and read the docs on create(). 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-/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 -~----------~----~----~----~------~----~------~--~---