Class: Sunspot::Rails::Adapters::ActiveRecordInstanceAdapter

Inherits:
Adapters::InstanceAdapter show all
Defined in:
sunspot_rails/lib/sunspot/rails/adapters.rb

Instance Method Summary (collapse)

Methods inherited from Adapters::InstanceAdapter

adapt, for, #index_id, index_id_for, #initialize, register

Constructor Details

This class inherits a constructor from Sunspot::Adapters::InstanceAdapter

Instance Method Details

- (Object) id

Return the primary key for the adapted instance

Returns

Integer

Database ID of model



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

def id
  @instance.id
end