Sha256: dc3b572be5b63b7c9f431ebae7750f20f9b6f2b48e58755b3209119837dafaae
Contents?: true
Size: 556 Bytes
Versions: 24
Compression:
Stored size: 556 Bytes
Contents
# encoding: utf-8 module Mongoid module Persistence module Atomic # Performs atomic $unset operations. class Unset include Operation # Sends the atomic $unset operation to the database. # # @example Persist the new values. # unset.persist # # @return [ nil ] The new value. # # @since 2.1.0 def persist prepare do document.attributes.delete(field) execute("$unset") end end end end end end
Version data entries
24 entries across 24 versions & 2 rubygems