Module: Elasticsearch::Model::Indexing::InstanceMethods
- Defined in:
- lib/activerecord_reindex/update_document_monkey_patch.rb
Instance Method Summary collapse
- #original_update_document ⇒ Object
-
#update_document(*args, request_record: nil) ⇒ Object
monkey patch update_document method from elasticsearch gem use
super
and hook on reindex to reindex associations for why request_record needed here and what it is see sync_adapter.rb.
Instance Method Details
#original_update_document ⇒ Object
8 |
# File 'lib/activerecord_reindex/update_document_monkey_patch.rb', line 8 alias original_update_document update_document |
#update_document(*args, request_record: nil) ⇒ Object
monkey patch update_document method from elasticsearch gem use super
and hook on reindex to reindex associations for why request_record needed here and what it is see sync_adapter.rb
13 14 15 16 17 18 |
# File 'lib/activerecord_reindex/update_document_monkey_patch.rb', line 13 def update_document(*args, request_record: nil) if _active_record_model?(self.class) _reindex_reflections(self.class, request_record) end original_update_document(*args) end |