Class: Sunspot::MongoMapper::Adapters::MongoMapperInstanceAdapter

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

Instance Method Summary collapse

Instance Method Details

#idObject

Return the primary key for the adapted instance

Returns

Integer

Database ID of model



16
17
18
# File 'lib/sunspot/mongo_mapper/adapters.rb', line 16

def id
  @instance.id
end