I'm trying to implement pagination in my Rails 3 app with Kaminari but I'm getting the following error:
undefined method `page' for #<Array:0x007fe43f4b0e80>
This is what I have in my controller:
@stories = Story.find_all_by_keynote_id(@keynote, :order => 'created_at DESC').page(params[:page])
And this is what I put in my view:
<%= paginate @stories %>
I think there's a problem with the "find_all_by_keynote_id" but I'm not sure how to fix it.
Thank you!