mongoid/mongoid — comment on commit 7a915395db50e2bc6071a503a11530e644879e49
File: lib/mongoid/relations/builders/nested_attributes/many.rb line 95
By Nico-Taing:

This breaks in a lot of situations because `existing.first` can be nil:

# NoMethodError: undefined method `using_object_ids?' for NilClass:Class
# [GEM_ROOT]/gems/mongoid-2.4.0/lib/mongoid/extensions/object_id/conversions.rb:34:in `convert'
# [GEM_ROOT]/gems/mongoid-2.4.0/lib/mongoid/relations/nested_builder.rb:72:in `convert_id'
# .... truncated ....
# [GEM_ROOT]/gems/mongoid-2.4.0/lib/mongoid/attributes.rb:132:in `assign_attributes'

and nil doesn't respond to `using_object_ids?`