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
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
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
endAs 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.
Caveat: I am a noobie to Rails .. just trying to help.
but still, you're right. mislav-will_paginate is the way to go.
Thanks bro got the solutions
@students = Seminar.find(params[:id]).students.paginate (:page => params[:page], :per_page => 10)