Sha256: 50b45cdc10f3d6d86f44e55a676281b4d3a498d9b98efc895d340324a569476b

Contents?: true

Size: 733 Bytes

Versions: 25

Compression:

Stored size: 733 Bytes

Contents

# frozen_string_literal: true

module Fruits
  class Apple
    include Mongoid::Document
    has_many :bananas, class_name: "Fruits::Banana"
    has_many :fruits_melons, class_name: "Fruits::Melon"
    recursively_embeds_many
  end

  class Banana
    include Mongoid::Document
    belongs_to :apple, class_name: "Fruits::Apple"
  end

  class Melon
    include Mongoid::Document
    belongs_to :fruit_apple, class_name: "Fruits::Apple"
  end

  class Pineapple
    include Mongoid::Document
    recursively_embeds_many cascade_callbacks: true
  end

  class Mango
    include Mongoid::Document
    recursively_embeds_one cascade_callbacks: true
  end

  module Big
    class Ananas
      include Mongoid::Document
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
mongoid-8.1.8 spec/support/models/fruits.rb
mongoid-8.1.7 spec/support/models/fruits.rb
mongoid-8.1.6 spec/support/models/fruits.rb
mongoid-8.0.8 spec/support/models/fruits.rb
mongoid-8.1.5 spec/support/models/fruits.rb
mongoid-8.1.4 spec/support/models/fruits.rb
mongoid-8.0.7 spec/support/models/fruits.rb
mongoid-8.1.3 spec/support/models/fruits.rb
mongoid-8.1.2 spec/support/models/fruits.rb
mongoid-8.0.6 spec/support/models/fruits.rb
mongoid-7.5.4 spec/support/models/fruits.rb
mongoid-8.1.1 spec/support/models/fruits.rb
mongoid-8.0.5 spec/support/models/fruits.rb
mongoid-8.1.0 spec/support/models/fruits.rb
mongoid-7.5.3 spec/support/models/fruits.rb
mongoid-8.0.4 spec/support/models/fruits.rb
mongoid-8.0.3 spec/support/models/fruits.rb
mongoid-7.5.2 spec/support/models/fruits.rb
mongoid-8.0.2 spec/support/models/fruits.rb
mongoid-7.5.1 spec/support/models/fruits.rb