2
請分頁(3.0.3)不適用於繼承的資源(1.3.1)。在我的控制器:will_paginate和inherited_resources不能一起工作
protected
def collection
@posts ||= end_of_association_chain.paginate(:page => params[:page])
end
我說需要我的初始化「will_paginate /陣列」,但這並沒有解決問題。我怎樣才能工作將分頁和繼承資源放在一起?在我的意見,我得到錯誤
undefined method `total_pages' for #<ActiveRecord::Relation:0x00000004312e38>