Provide a fix for many associations not yielding to each in callbacks. #462

Merged
merged 1 commit into from Oct 3, 2012
Commits on Oct 2, 2012
  1. Provide a fix for many associations not yielding to each in callbacks.

    gaffneyc committed Oct 2, 2012
    Ran into an issue when iterating over a many association in a
    before_save callback on a document. For an association named foos,
    `foos.inspect` would show the items but `foos.each` would never yield to
    the given block since it appears to be empty.
    
    The original issue I was tracking down was that instead of not yielding
    it was yielding instances of Mongo::Cursor instead of the association
    object. I haven't been able to recreate that case.