HABTM & pagination confused

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:

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.

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)