Performs atomic $unset operations.
Sends the atomic $unset operation to the database.
@example Persist the new values.
unset.persist
@return [ nil ] The new value.
@since 2.1.0
# File lib/mongoid/persistence/atomic/unset.rb, line 17 def persist prepare do document.attributes.delete(field) collection.update(document.atomic_selector, operation("$unset"), options) document.remove_change(value) end end
Generated with the Darkfish Rdoc Generator 2.