Sha256: cf9e6519c51637aec00dccf9b67d487791e775956357b05b5c3696afcbc40cbe
Contents?: true
Size: 750 Bytes
Versions: 2
Compression:
Stored size: 750 Bytes
Contents
# frozen_string_literal: true class ThinkingSphinx::ActiveRecord::Callbacks::DeleteCallbacks < ThinkingSphinx::Callbacks callbacks :after_commit, :after_destroy, :after_rollback def after_commit delete_from_sphinx end def after_destroy delete_from_sphinx end def after_rollback delete_from_sphinx end private def delete_from_sphinx return if ThinkingSphinx::Callbacks.suspended? || instance.new_record? indices.each { |index| ThinkingSphinx::Deletion.perform( index, instance.public_send(index.primary_key) ) } end def indices ThinkingSphinx::Configuration.instance.index_set_class.new( :instances => [instance], :classes => [instance.class] ).to_a end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
thinking-sphinx-5.4.0 | lib/thinking_sphinx/active_record/callbacks/delete_callbacks.rb |
thinking-sphinx-5.3.0 | lib/thinking_sphinx/active_record/callbacks/delete_callbacks.rb |