下载 will_paginate.rar
解压到 InstantRails-2.0-win\rails_apps\mytest\vendor\plugins
重启服务器
@products= Product.paginate :page => params[:page],:per_page => params[:rows],:order => params[:sidx] + ' ' + ((["desc","asc"].index params[:sord])?params[:sord]:"")
分页功能ok!
解压到 InstantRails-2.0-win\rails_apps\mytest\vendor\plugins
重启服务器
@products= Product.paginate :page => params[:page],:per_page => params[:rows],:order => params[:sidx] + ' ' + ((["desc","asc"].index params[:sord])?params[:sord]:"")
分页功能ok!