`
pvpful
  • 浏览: 19629 次
  • 性别: Icon_minigender_1
  • 来自: 北京
最近访客 更多访客>>
社区版块
存档分类
最新评论

undefined method ‘paginate’ for Array (will_paginate 3.0)

 
阅读更多

If you ever find this problem (Github Issue) you should know that WillPaginate 3.0 isn’t backwards compatible.

This also is tightly coupled with the new Active Record implementation (Now it returns ActiveRecord::Relation, which are lazy arrays)

This solved the problem I was having:

1
2
  # 调用的controller目录
  require 'will_paginate/array'
 

Be careful when you upgrade your will_paginate gem.

from:http://www.etagwerker.com/2011/09/liquid-error-undefined-method-paginate-for-array-will-paginate-3-0/

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics