locomotivecms/engine — Issue #236: Has_many collection can't paginate
Author: chewbie
Created: 2011-10-24 10:10:45+00:00
State: open

Hey,

So I have a content_type Category which has_many Post.

However in a templatized page for category, in Liquid when I do :

{% paginate category.posts by 3 %}

{% endpaginate %}

I have back : Liquid error: undefined method `stringify_keys' for #

It's weird since in console when I call paginate on the category.posts the object returned is a WillPaginate::Collection

My guess would be that the file liquid/drops/contents.rb define a paginate method for its collection, but category.posts not being a collection of the contents object, does not get to have access to this method which seems to be important...

Hope I gave enough information, if anything more is required, tell me :)