Method: Mongoid::Collection#update
- Defined in:
- lib/mongoid/collection.rb
#update(selector, document, options = {}) ⇒ Object
Updates one or more documents in the collection.
144 145 146 147 148 149 150 151 |
# File 'lib/mongoid/collection.rb', line 144 def update(selector, document, = {}) updater = Threaded.update_consumer(klass) if updater updater.consume(selector, document, ) else master().update(selector, document, ) end end |