Class: Esse::AsyncIndexing::ActiveRecordCallbacks::OnDestroy
- Inherits:
-
Callback
- Object
- Esse::ActiveRecord::Callback
- Callback
- Esse::AsyncIndexing::ActiveRecordCallbacks::OnDestroy
- Defined in:
- lib/esse/async_indexing/active_record_callbacks/on_destroy.rb
Instance Attribute Summary
Attributes inherited from Callback
Instance Method Summary collapse
Methods inherited from Callback
Constructor Details
This class inherits a constructor from Esse::AsyncIndexing::ActiveRecordCallbacks::Callback
Instance Method Details
#call(model) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/esse/async_indexing/active_record_callbacks/on_destroy.rb', line 6 def call(model) if (doc_id = resolve_document_id(model)) repo.async_indexing_job_for(:delete).call(**, service: service_name, repo: repo, operation: :delete, id: doc_id) end true end |