mongoid/mongoid — pull request #3495 by robertjpayne (2014-01-17 13:11:47+00:00)
Title: Check length to enforce includes better

In addition to #3383 eager loading is actually completely broken for and has_and_belongs_to_many. The spec has let this slip by because it checks for nil. The eager loader is sending back an empty array which passes.