Sha256: 1427d0cf35e5b13a783df93cb3e631ad5dff1c280ddfdfda7b5ebc6f84d44d0b

Contents?: true

Size: 318 Bytes

Versions: 9

Compression:

Stored size: 318 Bytes

Contents

require_relative "publishable_object"

class ParentPublishableObject < PublishableObject
  embeds_many :nested_objects, class_name: "NestedPublishableObject"
end

class NestedPublishableObject < PublishableObject
  embedded_in :parent_publishable, class_name: "ParentPublishableObject", inverse_of: :nested_objects
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
mongoid-publishable-0.4.0 spec/support/models/nested_publishable_object.rb
mongoid-publishable-0.3.2 spec/support/models/nested_publishable_object.rb
mongoid-publishable-0.3.1 spec/support/models/nested_publishable_object.rb
mongoid-publishable-0.2.1 spec/support/models/nested_publishable_object.rb
mongoid-publishable-0.2.0 spec/support/models/nested_publishable_object.rb
mongoid-publishable-0.1.0 spec/support/models/nested_publishable_object.rb
mongoid-publishable-0.0.5 spec/support/models/nested_publishable_object.rb
mongoid-publishable-0.0.4 spec/support/models/nested_publishable_object.rb
mongoid-publishable-0.0.3 spec/support/models/nested_publishable_object.rb