Method: Mongo::Collection#replace_one
- Defined in:
- lib/mongo/collection.rb
#replace_one(filter, replacement, options = {}) ⇒ Result
Replaces a single document in the collection with the new document.
1061 1062 1063 |
# File 'lib/mongo/collection.rb', line 1061 def replace_one(filter, replacement, = {}) find(filter, ).replace_one(replacement, ) end |