-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
class Parent; include Mongoid::Document; end class Sub1 < Parent field :bar end class Sub2 < Parent belongs_to :bar end Sub1.new(:bar => "1").bar => nil Sub1.new(:bar => "1").bar_id => "1"
So you can see, Sub1 just has a plain field called bar, whereas Sub2 has a belongs_to association called bar. The latter seems to be overriding the former in some way.