class ThinkingSphinx::ActiveRecord::Callbacks::DeleteCallbacks
Public Instance Methods
after_destroy()
click to toggle source
# File lib/thinking_sphinx/active_record/callbacks/delete_callbacks.rb, line 6 def after_destroy delete_from_sphinx end
after_rollback()
click to toggle source
# File lib/thinking_sphinx/active_record/callbacks/delete_callbacks.rb, line 10 def after_rollback delete_from_sphinx end
Private Instance Methods
delete_from_sphinx()
click to toggle source
# File lib/thinking_sphinx/active_record/callbacks/delete_callbacks.rb, line 16 def delete_from_sphinx return if ThinkingSphinx::Callbacks.suspended? || instance.new_record? indices.each { |index| ThinkingSphinx::Deletion.perform index, instance.id } end
indices()
click to toggle source
# File lib/thinking_sphinx/active_record/callbacks/delete_callbacks.rb, line 24 def indices ThinkingSphinx::Configuration.instance.index_set_class.new( :classes => [instance.class] ).to_a end