Sha256: 97b627414f0a15a8dfa8671918b1078382871ae7925af8761548014564247f68
Contents?: true
Size: 476 Bytes
Versions: 2
Compression:
Stored size: 476 Bytes
Contents
module Mongo class DB def nolock_eval(code, *args) if not code.is_a? BSON::Code code = BSON::Code.new(code) end oh = BSON::OrderedHash.new oh[:$eval] = code oh[:args] = args oh[:nolock] = true doc = command(oh) doc['retval'] end end end module Mongoid module Document def self.included(base) models << base.to_s super end def self.models @models ||= [] end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mongoid_ext-0.9.0 | lib/mongoid_ext/patches.rb |
mongoid_ext-0.7.1 | lib/mongoid_ext/patches.rb |