Sha256: b72b70382016e8c6518b9c719eeb023b198370e1f5b93d9ae0666a2a4cd54c56

Contents?: true

Size: 459 Bytes

Versions: 4

Compression:

Stored size: 459 Bytes

Contents

module MongoidOrderable #:nodoc:
  module Mongoid #:nodoc:
    module Contexts #:nodoc:
      module Mongo #:nodoc:
        def inc attributes = {}
          klass.collection.update(
            selector,
            { "$inc" => attributes },
            :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

4 entries across 4 versions & 1 rubygems

Version Path
mongoid_orderable-1.0.0 lib/mongoid_orderable/mongoid/contexts/mongo.rb
mongoid_orderable-0.9.1 lib/mongoid_orderable/mongoid/contexts/mongo.rb
mongoid_orderable-0.9.0 lib/mongoid_orderable/mongoid/contexts/mongo.rb
mongoid_orderable-0.0.1 lib/mongoid_orderable/mongoid/contexts/mongo.rb