Hello friends, Here is my code though which i am getting value @students = [] Seminar.find(params[:id]).students.each do |student| @students << student end As now i want to implememt pagination.. But no idea how should i implement. Thanks Abhi --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Abhishek shukla wrote:> > Hello friends, > > Here is my code though which i am getting value > > @students = [] > Seminar.find(params[:id]).students.each do |student| > @students << student > end > > > As now i want to implememt pagination.. But no idea how should i > implement. > > Thanks > Abhi > > > > >You should explore will_paginate plugin which is what I intend to do in a few days when I get to my problem. http://wiki.github.com/mislav/will_paginate Caveat: I am a noobie to Rails .. just trying to help. -- View this message in context: http://www.nabble.com/HABTM---pagination-confused-tp21949213p21949375.html Sent from the RubyOnRails Users mailing list archive at Nabble.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 -~----------~----~----~----~------~----~------~--~---
> Caveat: I am a noobie to Rails .. just trying to help.but still, you''re right. mislav-will_paginate is the way to go. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thanks bro got the solutions @students = Seminar.find(params[:id]).students.paginate (:page => params[:page], :per_page => 10) On Wed, Feb 11, 2009 at 1:35 PM, MaD <mayer.dominik-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > > Caveat: I am a noobie to Rails .. just trying to help. > > but still, you''re right. mislav-will_paginate is the way to go. > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---