-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
None
class A include Mongoid::Document belongs_to :b belongs_to :pol, :polymorphic => true end class B include Mongoid::Document has_many :a end class C include Mongoid::Document has_one :a, :as => :pol # BTW, problem disappear with has_many end A.create(:b => B.create, :pol => C.create) # The error occurred while evaluating nil.push # … /.rvm/gems/ruby-1.9.2-head/gems/mongoid-2.1.2/lib/mongoid/relations/bindings/referenced/in.rb:32:in `block in bind' A.create(:pol => C.create, :b => B.create) # OK