will_paginate

Hi,everybody
I write a code like follow,the question was "paginate" has been drop
until the rails 2.0,now we use
"will_paginate" to replace it.But I don't know how to change my code
to let it suitable.

Thanks,I had deal with the problem .