Module: Mongoid::SleepingKingStudios::HasTree::ClassMethods
- Defined in:
- lib/mongoid/sleeping_king_studios/has_tree.rb
Overview
Class methods added to the base class via #extend.
Instance Method Summary collapse
-
#has_tree(options = {}) ⇒ Object
Sets up the relations necessary for the tree structure.
-
#roots ⇒ Mongoid::Criteria
Returns a Criteria specifying all root objects, e.g.
Instance Method Details
#has_tree(options = {}) ⇒ Object
185 186 187 188 |
# File 'lib/mongoid/sleeping_king_studios/has_tree.rb', line 185 def has_tree ** concern = Mongoid::SleepingKingStudios::HasTree concern.apply self, end |
#roots ⇒ Mongoid::Criteria
Returns a Criteria specifying all root objects, e.g. objects with no parent object.
|
# File 'lib/mongoid/sleeping_king_studios/has_tree.rb', line 190
|