Hmmm.... strange that will_paginate doesn't raise an error. It should *not* be able to eager load a polymorphic association like commentable. The problem is that with a polymorphic association, the commentable could be from any number of tables (it could be a User, a Post, a Clipping, etc.), so eager loading won't work because Rails doesn't know which tables to join on ahead of time. I suspect something else is going on here, like maybe will_paginate just disregards the :include parameter when it's polymorphic (or something).
I'm not strongly opposed to using will_paginate if the integration is clean and upgrading is smooth, but I don't see any great benefit in moving to it (maybe someone can convince me). Thanks, Bruno On Sun, Oct 4, 2009 at 10:35 PM, moritz <[email protected]> wrote: > > I'm getting an ActiveRecord::EagerLoadPolymorphicError with > paginating_find when I include an :include => :commentable parameter > in the call. This doesn't happen when I use will_paginate instead. > > After testing and confirming this outside of CE, I am wondering if > it's possible and of interest to the community to replace > paginating_find with will_paginate within CE. What would be the > pitfalls? Any feedback is very welcome. > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CommunityEngine" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/communityengine?hl=en -~----------~----~----~----~------~----~------~--~---
