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

Version Path
rocketjob-6.3.1 lib/rocket_job/extensions/mongoid/contextual/mongo.rb
rocketjob-6.3.0 lib/rocket_job/extensions/mongoid/contextual/mongo.rb
rocketjob-6.2.0 lib/rocket_job/extensions/mongoid/contextual/mongo.rb
rocketjob-6.1.1 lib/rocket_job/extensions/mongoid/contextual/mongo.rb
rocketjob-6.1.0 lib/rocket_job/extensions/mongoid/contextual/mongo.rb
rocketjob-6.0.3 lib/rocket_job/extensions/mongoid/contextual/mongo.rb
rocketjob-6.0.2 lib/rocket_job/extensions/mongoid/contextual/mongo.rb
rocketjob-6.0.1 lib/rocket_job/extensions/mongoid/contextual/mongo.rb
rocketjob-6.0.0 lib/rocket_job/extensions/mongoid/contextual/mongo.rb
rocketjob-6.0.0.rc3 lib/rocket_job/extensions/mongoid/contextual/mongo.rb
rocketjob-6.0.0.rc2 lib/rocket_job/extensions/mongoid/contextual/mongo.rb