Sha256: 1061f9722e5d4a3b277c34ab4207e30bdfa061992e40dc1e369f2415fc11a0cb
Contents?: true
Size: 553 Bytes
Versions: 11
Compression:
Stored size: 553 Bytes
Contents
::Mongoid::Contextual::Mongo module Mongoid module Contextual class Mongo def initialize(criteria) @criteria = criteria @klass = criteria.klass @cache = criteria.options[:cache] # Only line changed is here, get collection name from criteria, not @klass # @collection = @klass.collection @collection = criteria.collection criteria.send(:merge_type_selection) @view = collection.find(criteria.selector, session: _session) apply_options end end end end
Version data entries
11 entries across 11 versions & 1 rubygems