Yes you can do conditional paginates. See my search method below.
Note that you have to remember the search conditions between pages
because you have to restate them on calls for subsequent pages. I stick
mine in the session.
Hope this helps,
session[:search] = [“category_id = ? and address_posttown like ?
and address_postcode like ? and published is true”,
@items = Item.paginate :page => params[:page],
:conditions => session[:search]
flash.now[:error] = "Sorry, nothing matched your search request"
# old-fashioned reload for browsers not doing AJAX
render :action => :search unless request.xhr?
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.