Sha256: 7ea8b927b3109602f96f9fb562044a382e52fb0ff36a6ad60e040091afa75770
Contents?: true
Size: 530 Bytes
Versions: 14
Compression:
Stored size: 530 Bytes
Contents
::Mongoid::Contextual::Mongo module Mongoid module Contextual class Mongo def initialize(criteria) @criteria, @klass, @cache = criteria, criteria.klass, 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
14 entries across 14 versions & 1 rubygems