Method: Mongoid::Collection#insert
- Defined in:
- lib/mongoid/collection.rb
#insert(documents, options = {}) ⇒ Object
Inserts one or more documents in the collection.
93 94 95 96 97 98 99 100 |
# File 'lib/mongoid/collection.rb', line 93 def insert(documents, = {}) consumer = Threaded.insert if consumer consumer.consume(documents, ) else master().insert(documents, ) end end |