Sha256: bb1bcecb10423a3ee209554764ea33812e19eae34f3bfaa7bc1e425c3d42ae2e

Contents?: true

Size: 470 Bytes

Versions: 6

Compression:

Stored size: 470 Bytes

Contents

module MongoidOrderable #:nodoc:
  module Mongoid #:nodoc:
    module Contexts #:nodoc:
      module Mongo #:nodoc:
        def inc attribute, value
          klass.collection.update(
            selector,
            { "$inc" => {attribute => value} },
            :multi => true,
            :safe => ::Mongoid.persist_in_safe_mode
          )
        end
      end
    end
  end
end

Mongoid::Contexts::Mongo.send :include, MongoidOrderable::Mongoid::Contexts::Mongo

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
mongoid_orderable-5.0.0 lib/mongoid_orderable/mongoid/contexts/mongo.rb
mongoid_orderable-4.1.1 lib/mongoid_orderable/mongoid/contexts/mongo.rb
mongoid_orderable-4.1.0 lib/mongoid_orderable/mongoid/contexts/mongo.rb
mongoid_orderable-4.0.0 lib/mongoid_orderable/mongoid/contexts/mongo.rb
mongoid_orderable-1.2.0 lib/mongoid_orderable/mongoid/contexts/mongo.rb
mongoid_orderable-1.1.0 lib/mongoid_orderable/mongoid/contexts/mongo.rb