Sha256: 26a94d2bc7fc5a006fb7d323d0395f98468f9529761ace2f7418a81fe046b476

Contents?: true

Size: 242 Bytes

Versions: 16

Compression:

Stored size: 242 Bytes

Contents

# frozen_string_literal: true

class BTMArticle
  include Mongoid::Document
  has_many :comments, class_name: "BTMComment"
end

class BTMComment
  include Mongoid::Document
  belongs_to :article, class_name: "BTMArticle", required: false
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
mongoid-8.1.7 spec/mongoid/association/referenced/belongs_to_models.rb
mongoid-8.1.6 spec/mongoid/association/referenced/belongs_to_models.rb
mongoid-8.0.8 spec/mongoid/association/referenced/belongs_to_models.rb
mongoid-8.1.5 spec/mongoid/association/referenced/belongs_to_models.rb
mongoid-8.1.4 spec/mongoid/association/referenced/belongs_to_models.rb
mongoid-8.0.7 spec/mongoid/association/referenced/belongs_to_models.rb
mongoid-8.1.3 spec/mongoid/association/referenced/belongs_to_models.rb
mongoid-8.1.2 spec/mongoid/association/referenced/belongs_to_models.rb
mongoid-8.0.6 spec/mongoid/association/referenced/belongs_to_models.rb
mongoid-8.1.1 spec/mongoid/association/referenced/belongs_to_models.rb
mongoid-8.0.5 spec/mongoid/association/referenced/belongs_to_models.rb
mongoid-8.1.0 spec/mongoid/association/referenced/belongs_to_models.rb
mongoid-8.0.4 spec/mongoid/association/referenced/belongs_to_models.rb
mongoid-8.0.3 spec/mongoid/association/referenced/belongs_to_models.rb
mongoid-8.0.2 spec/mongoid/association/referenced/belongs_to_models.rb
mongoid-8.0.1 spec/mongoid/association/referenced/belongs_to_models.rb