Hi, I've just switched to will_paginate, which is impressive and easy to
I have a question regarding conditions:
I build a query using values from the params that were entered onto a
web form using something like
:conditions => [" foo like x and bar like y", params[:x]+"%",
It would appear that the conditions need to be respecified on each page
so I have had to remember them in the session:
session[:search] = ["category_id = ? and foo like ?
and bar like ?",
@items = Item.paginate :page => params[:page],
:conditions => session[:search]
This works, but have I got it right, or is there a better way?