Sha256: 7d9b67dae2774ddbe2d68f6ea5ac3d52e691fc124ef4a21ee4f7cf84d7f4394a
Contents?: true
Size: 547 Bytes
Versions: 13
Compression:
Stored size: 547 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
13 entries across 13 versions & 1 rubygems