mongoid/mongoid — pull request #3881 by gauthier-delacroix (2014-12-08 11:51:56+00:00)
Title: Fix calls to #id instead of #_id

I've already fixed this kind of issue in #3792: many internal id calls are still made on `#id` instead of `#_id`.

Problems occurs when overloading the `id` field with another data (which is my case because I don't want to expose the internal ID to my web API). Maybe I shouldn't do that but, why is this field called `_id` if we're not allowed to use a custom `id` beside the DB ID ?

Here I had problems with relations, for example:
````ruby
g=Group.new(people: [p1, p2])
g.person_ids
# => ["sWBmBJioRr", "MVOb1BZFLMLL"]
# (custom ids)

g.people = [p1, p2]
g.person_ids
# => ["sWBmBJioRr", "MVOb1BZFLMLL", BSON::ObjectId('530638bd6c696c1299180000'), BSON::ObjectId('53a991fa6c696c1fce240000')]
# (custom AND DB ids)
````
I've replaced many of them I've found in the code (probably fixing other similar issues at the same time), all tests pass, and now I get the expected behavior:

````ruby
g=Group.new(people: [p1, p2])
g.person_ids
# => [BSON::ObjectId('530638bd6c696c1299180000'), BSON::ObjectId('53a991fa6c696c1fce240000')]
# (only DB ids)
````