Sha256: 8184122c7b9eb5402e71831c847e7db7d99fa8435f2b2b15bae1c35ee80fbc36
Contents?: true
Size: 452 Bytes
Versions: 1
Compression:
Stored size: 452 Bytes
Contents
# frozen_string_literal: true require 'mongoid-sortable' class ParentDocument include Mongoid::Document has_many :documents end class Document include Mongoid::Document include Mongoid::Sortable belongs_to :parent_document, optional: true embeds_many :embedded_documents sortable scope: [:parent_document_id] end class EmbeddedDocument include Mongoid::Document include Mongoid::Sortable embedded_in :document sortable end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mongoid-sortable-1.0.1 | spec/support/models.rb |