You don't want to use any plugins? Then you either need to get a new
job or stop asking rails-talk to do your homework...
Seriously though, mislav-will_paginate on github does exactly what
you're looking for. Don't re-invent the wheel.
Keep up to date with Rails on Twitter and This Week in Rails
Policies: Conduct, License, Maintenance, Security, Trademarks