mongoid/mongoid — pull request #1802 by cjab (2012-03-08 17:27:00+00:00)
Title: Return documents from push on many to many relation

The documentation for the push method on the many_to_many relation states that the method should return an array of loaded documents. It doesn't seem to though.

When pushing a related object onto a parent that has not been persisted, push returns an empty array:

```ruby
preference = Preference.new
person = Person.new
person.preferences.push(preference)
# => []
```

When the parent has been persisted, only an array containing the object id of the child is returned:

```ruby
preference = Preference.create
person = Person.new
person.preferences.push(preference)
# => [BSON::ObjectId('4f58e279cd22553fb2000009')]
```

This is being returned by the call to batched within the push method. It seems like the relation itself should be returned instead.