Sha256: fd79d3c9c02eca9aee09ac1859add8db52d4a87d91d3fd2af3aa9be2d1ed98f1

Contents?: true

Size: 387 Bytes

Versions: 1

Compression:

Stored size: 387 Bytes

Contents

# 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

1 entries across 1 versions & 1 rubygems

Version Path
mongoscript-0.0.8 lib/mongoscript/orm/mongoid_document_methods.rb