Class: Sunspot::MongoMapper::DataAccessor

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

Instance Method Summary collapse

Instance Method Details

#load(id) ⇒ Object



22
23
24
# File 'lib/sunspot/mongo_mapper.rb', line 22

def load(id)
  @clazz.first(:id => id)
end

#load_all(ids) ⇒ Object



26
27
28
# File 'lib/sunspot/mongo_mapper.rb', line 26

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