search for: region_list

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

Did you mean: region_limit
2006 Apr 12
1
how do i paginate the results of a query?
...nd rails newb). How can I paginate the set my region_search method returns rather than all the regions in my database? Thanks. def region_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 l...