I'm using Mongoid, but all I need to do is increment a field which is an integer. Would it be worth it for me to skip using Mongoid's methods, and just run the mongodb ruby drivers method to increment a value?
How would I do that?
Why not use Mongoid's inc method?
Model#inc
Performs MongoDB's
$incmodifier which increments it's value by the supplied amount or initializes it to that value. If the field is not numeric an error will be raised.
So doing model.inc(:a, 11) should send an { $inc: { a: 11 } } update straight into MongoDB.