Last Updated: February 19, 2017
· neutralino1

Atomic increment in Mongoid

If you have to increment a value via Mongoid, simply go for the Model#inc method:, 1)

See other atomic operations on the official doc.

1 Response
Add your response

That is very helpful, is there a method to decrement too? - I can't seem to find out.

over 1 year ago ·