# File lib/mongoid/persistence/atomic/inc.rb, line 18 def persist prepare do current = document[field] || 0 document[field] = current + value document[field].tap do collection.update(document.atomic_selector, operation("$inc"), options) document.remove_change(field) end end end