Rails 关于 will_paginate 插件

sforce100 · October 21, 2012 · Last by sforce100 replied at October 21, 2012 · 1988 hits

用分页插件 will_paginate 总出现 undefined method `paginate' for Product:Class....在 gemfile 中加入 gem“will_paginate”

也 bundle 了。。

好纠结啊。。还可以怎么解决啊。。新手求教

你用了 mongoid??

对!!!!

#3 楼 @sforce100 加个 desc 或者其他什么的。就对 了。

#4 楼 @ruby_sky @teachers = Teacher.paginate :page=>params[:page], :order => 'school_at desc',:per_page =>10 还是不行

You need to Sign in before reply, if you don't have an account, please Sign up first.