Method: Chewy::Index::Adapter::Object#identify

Defined in:
lib/chewy/index/adapter/object.rb

#identify(collection) ⇒ Array<Object>

While for ORM adapters it returns an array of ids for the passed collection, for the object adapter it returns the collection itself.

Parameters:

  • collection (Array<Object>, Object)

    a collection or an object

Returns:



52
53
54
# File 'lib/chewy/index/adapter/object.rb', line 52

def identify(collection)
  Array.wrap(collection)
end