Method: Mongoid::Atomic#atomic_pulls
- Defined in:
- lib/mongoid/atomic.rb
#atomic_pulls ⇒ Array<Hash>
Get all the attributes that need to be pulled.
203 204 205 206 207 208 209 210 211 212 213 214 |
# File 'lib/mongoid/atomic.rb', line 203 def atomic_pulls pulls = {} delayed_atomic_pulls.each_pair do |_, docs| path = nil ids = docs.map do |doc| path ||= doc.flag_as_destroyed doc._id end pulls[path] = { "_id" => { "$in" => ids }} and path = nil end pulls end |