search for: region_pages

Displaying 1 result from an estimated 1 matches for "region_pages".

2006 Apr 12
1
how do i paginate the results of a query?
...egion_search regions = Region.find(:all, :conditions => ["name like ?", "%" << params[:name].to_s << "%"]) end def region_list if params[:name].nil? or params[:name].eql?([""]) logger.info("name is nil or empty") @region_pages, @regions= paginate :regions, :per_page => 10 else logger.info("name is not empty") #this is kinda weird, seem to need the following line for some strange reason #I guess the page expects it @regions=region_search @region_pages, region_search= paginate...