Method: Document.process

Defined in:
app/models/document.rb

.process(&block) ⇒ Object

Allow all documents to be processed in tree structure



74
75
76
77
78
# File 'app/models/document.rb', line 74

def self.process(&block)
  Document.all.group_by(&:meta_definition).each do | meta_definition, documents |
    documents.each { |document| yield(document, meta_definition)}
  end
end