Will_Paginate::Collection
次のコードを使用してオブジェクトを作成しています
@paginatedResults = WillPaginate::Collection.new(1, 5)
@paginatedResults.replace @results[@paginatedResults.offset,
@paginatedResults.per_page]
しかし、使用してページネーションをレンダリングしようとすると
<%= will_paginate @paginatedResults %>
例外が発生します
You have a nil object when you didn't expect it!
The error occurred while evaluating nil.>
オブジェクトのtotal_entries
プロパティまでさかのぼりました。Will_Paginate::Collections
プロパティがありません。どうしてか分かりません。
何か案は?