mongoid/mongoid — pull request #1677 by DouweM (2012-02-05 20:48:22+00:00)
Title: Add support for multiple polymorphic has_[one|many] relations on one model, to one model

RE: https://gist.github.com/3b941b2ad8f28364c696

This makes something like this possible:

```ruby
class Face
include Mongoid::Document

has_one :left_eye, :class_name => "Eye", :as => :eyeable
has_one :right_eye, :class_name => "Eye", :as => :eyeable
end

class Eye
include Mongoid::Document

belongs_to :eyeable, :polymorphic => true
end
```

Before, this wouldn't work like you would expect: because `Eye` only saves the `eyeable_type` and `eyeable_id` of its `eyeable`, `Face#left_eye` and `Face#right_eye` would refer to the same object.