Method: SearchFlip::Index::ClassMethods#fetch_records

Defined in:
lib/search_flip/index.rb

#fetch_records(ids) ⇒ Object

Returns a record set, usually an ActiveRecord::Relation, for the specified ids, ie primary keys. Override this method for custom primary keys and/or ORMs.

Parameters:

  • ids (Array)

    The array of ids to fetch the records for

Returns:

  • The record set or an array of records



199
200
201
# File 'lib/search_flip/index.rb', line 199

def fetch_records(ids)
  model.where(id: ids)
end