Parent

Methods

Class/Module Index [+]

Quicksearch

Mongoid::Persistence::Atomic::Sets

This class provides atomic $set behaviour.

Public Instance Methods

persist() click to toggle source

Sends the atomic $set operation to the database.

@example Persist the new values.

set.persist

@return [ Object ] The new field value.

@ssete 2.0.0

# File lib/mongoid/persistence/atomic/sets.rb, line 17
def persist
  prepare do
    document[field] = value
    execute("$set")
    document[field]
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.