Class: Sunspot::Mongoid::DataAccessor

Inherits:
Adapters::DataAccessor
  • Object
show all
Defined in:
lib/sunspot/mongoid.rb

Instance Method Summary collapse

Instance Method Details

#load(id) ⇒ Object



42
43
44
# File 'lib/sunspot/mongoid.rb', line 42

def load(id)
  @clazz.where(id: id).first
end

#load_all(ids) ⇒ Object



46
47
48
# File 'lib/sunspot/mongoid.rb', line 46

def load_all(ids)
  @clazz.where(:id.in => ids)
end