Module: Mongoid::Document
- Included in:
- Workarea::ApplicationDocument, Workarea::Metrics::ByDay, Workarea::Metrics::ProductForLastWeek, Workarea::Metrics::SearchForLastWeek, Workarea::Metrics::User
- Defined in:
- lib/workarea/ext/mongoid/lookup_hash.rb,
lib/workarea/ext/mongoid/embedded_children.rb,
lib/workarea/ext/freedom_patches/mongoid_simple_tags.rb
Defined Under Namespace
Modules: Taggable
Instance Method Summary collapse
-
#embedded_children ⇒ Array<Mongoid::Document>
Returns all the embedded children in this document by recursion.
Instance Method Details
#embedded_children ⇒ Array<Mongoid::Document>
Returns all the embedded children in this document by recursion.
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/workarea/ext/mongoid/embedded_children.rb', line 7 def result = [] .each do |name, | Array.wrap(send(name)).each do |child| result << child result += child. end end result end |