Sha256: d98590a8a7b57f0c502f15452839ca6b032705433ffdc9f05b0089f1dff5271b
Contents?: true
Size: 409 Bytes
Versions: 1
Compression:
Stored size: 409 Bytes
Contents
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.0 | spec/support/models.rb |