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

Version Path
rocketjob-6.0.0.rc1 lib/rocket_job/extensions/mongoid/contextual/mongo.rb
rocketjob-5.4.1 lib/rocket_job/extensions/mongoid/contextual/mongo.rb
rocketjob-5.4.0 lib/rocket_job/extensions/mongoid/contextual/mongo.rb
rocketjob-5.4.0.beta2 lib/rocket_job/extensions/mongoid/contextual/mongo.rb
rocketjob-5.4.0.beta1 lib/rocket_job/extensions/mongoid/contextual/mongo.rb
rocketjob-5.3.3 lib/rocket_job/extensions/mongoid/contextual/mongo.rb
rocketjob-5.3.2 lib/rocket_job/extensions/mongoid/contextual/mongo.rb
rocketjob-5.3.1 lib/rocket_job/extensions/mongoid/contextual/mongo.rb
rocketjob-5.3.0 lib/rocket_job/extensions/mongoid/contextual/mongo.rb
rocketjob-5.2.0 lib/rocket_job/extensions/mongoid/contextual/mongo.rb
rocketjob-5.2.0.beta3 lib/rocket_job/extensions/mongoid/contextual/mongo.rb
rocketjob-5.2.0.beta2 lib/rocket_job/extensions/mongoid/contextual/mongo.rb
rocketjob-5.2.0.beta1 lib/rocket_job/extensions/mongoid/contextual/mongo.rb