Class: Chewy::Type::Adapter::Mongoid

Inherits:
Orm show all
Defined in:
lib/chewy/type/adapter/mongoid.rb

Constant Summary

Constants inherited from Base

Base::BATCH_SIZE

Instance Attribute Summary

Attributes inherited from Orm

#default_scope

Attributes inherited from Base

#options, #target

Instance Method Summary collapse

Methods inherited from Orm

#import, #initialize, #load, #name

Methods inherited from Base

#import, #load, #name, #type_name

Constructor Details

This class inherits a constructor from Chewy::Type::Adapter::Orm

Instance Method Details

#identify(collection) ⇒ Object



8
9
10
# File 'lib/chewy/type/adapter/mongoid.rb', line 8

def identify collection
  super(collection).map { |id| id.is_a?(BSON::ObjectId) ? id.to_s : id }
end