Sha256: ec2e6670e92bc49d4022cfb99043ce09a4f6ce0e8ec1be71598460291719fdf5
Contents?: true
Size: 398 Bytes
Versions: 2
Compression:
Stored size: 398 Bytes
Contents
# @private # TBD: do we need this? module MongoidDocumentMethods module ClassMethods def find_by_javascript(script_name, *args) args = args.unshift(script_name) # get a bunch of results via a Mongoid Javascript call, # then turn each hash result into a Mongoid document MongoScript.execute_readonly_routine(*args).map { |hash| rehydrate(self, hash) } end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mongoscript-0.0.10 | lib/mongoscript/orm/mongoid_document_methods.rb |
mongoscript-0.0.9 | lib/mongoscript/orm/mongoid_document_methods.rb |