Class: Esse::AsyncIndexing::ActiveRecordCallbacks::OnCreate
- Inherits:
-
Callback
- Object
- Esse::ActiveRecord::Callback
- Callback
- Esse::AsyncIndexing::ActiveRecordCallbacks::OnCreate
- Defined in:
- lib/esse/async_indexing/active_record_callbacks/on_create.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_create.rb', line 6 def call(model) if (doc_id = resolve_document_id(model)) repo.async_indexing_job_for(:index).call(**, service: service_name, repo: repo, operation: :index, id: doc_id) end true end |