I am creating a Will_Paginate::Collection
object using the following code
@paginatedResults = WillPaginate::Collection.new(1, 5)
@paginatedResults.replace @results[@paginatedResults.offset,
@paginatedResults.per_page]
but when I try to render the pagination using
<%= will_paginate @paginatedResults %>
I get an exception
You have a nil object when you didn't expect it!
The error occurred while evaluating nil.>
I have traced it back to the total_entries
property on the Will_Paginate::Collections
object. The property is missing. I don't know why.
Any ideas?