Please sign in to comment.
Provide a fix for many associations not yielding to each in callbacks.
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.
- Loading branch information...
Showing with 34 additions and 1 deletion.