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

Version Path
rocketjob-5.1.1 lib/rocket_job/extensions/mongoid/contextual/mongo.rb
rocketjob-5.1.0 lib/rocket_job/extensions/mongoid/contextual/mongo.rb
rocketjob-5.0.0 lib/rocket_job/extensions/mongoid/contextual/mongo.rb
rocketjob-5.0.0.rc1 lib/rocket_job/extensions/mongoid/contextual/mongo.rb
rocketjob-5.0.0.beta4 lib/rocket_job/extensions/mongoid/contextual/mongo.rb
rocketjob-5.0.0.beta3 lib/rocket_job/extensions/mongoid/contextual/mongo.rb
rocketjob-5.0.0.beta2 lib/rocket_job/extensions/mongoid/contextual/mongo.rb
rocketjob-5.0.0.beta lib/rocket_job/extensions/mongoid/contextual/mongo.rb
rocketjob-4.3.0.beta2 lib/rocket_job/extensions/mongoid/contextual/mongo.rb
rocketjob-4.3.0.beta lib/rocket_job/extensions/mongoid/contextual/mongo.rb
rocketjob-4.2.0 lib/rocket_job/extensions/mongoid/contextual/mongo.rb
rocketjob-4.1.1 lib/rocket_job/extensions/mongoid/contextual/mongo.rb
rocketjob-4.1.0 lib/rocket_job/extensions/mongoid/contextual/mongo.rb
rocketjob-4.0.0 lib/rocket_job/extensions/mongoid/contextual/mongo.rb