这是我们索引中返回@customers 的代码:
@customers = Customerx::Customer.where(:active => true).order("since_date DESC, id DESC").paginate(:per_page => 30, :page => params[:page])
它导致以下错误:
undefined method `paginate' for #<ActiveRecord::Relation:0x6b88960>
在调试中,ActiveRecord::Base.respond_to? :paginate返回false. 在我们看来, will_paginate 没有加载,即使will_paginate (3.0.3) 返回了gem list.
代码可能有什么问题?