Class: ThinkingSphinx::ActiveRecord::Callbacks::DeleteCallbacks

Inherits:
Callbacks
  • Object
show all
Defined in:
lib/thinking_sphinx/active_record/callbacks/delete_callbacks.rb

Instance Attribute Summary

Attributes inherited from Callbacks

#instance

Instance Method Summary collapse

Methods inherited from Callbacks

callbacks, #initialize

Constructor Details

This class inherits a constructor from ThinkingSphinx::Callbacks

Instance Method Details

#after_destroyObject



6
7
8
9
10
11
12
# File 'lib/thinking_sphinx/active_record/callbacks/delete_callbacks.rb', line 6

def after_destroy
  return if instance.new_record?

  indices.each { |index|
    ThinkingSphinx::Deletion.perform index, instance.id
  }
end