-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
class Build include Mongoid::Document has_many :bsuites end class Bsuite include Mongoid::Document belongs_to :build end bs = Bsuite.new bs.build #=> stack level too deep!
resolve:
rename Module: Mongoid::Relations::Accessors#build to Module: Mongoid::Relations::Accessors#*build , also change getter,setter method to use *build
because in Module: Mongoid::Relations::Accessors the self is bs, so call build(name, object.substitutable, metadata) will always return nil.