Why are limited eager loads and conditions on the eager tables
Doing a find(:all) without :include causes a select * query to be
which means the id fields everwrite each other if associated tables are
included using :joins.
But using :include, if conditions are placed on the tables listed in
then Rails throws an exception when :limit is included too.
Ordinarily I’d just leave out the limit, but I’m populating a div of
size with draggables so I can’t have overflow set to auto, or they can’t
dragged out of the div…
Anyone have any suggestions as to how to use conditions on joined tables
limits as well? I’m thinking I might have to use :joins with :select and
the columns specifically, but it makes for messy code.