diff --git a/elasticsearch-model/README.md b/elasticsearch-model/README.md index a5345b4b..5da467bc 100644 --- a/elasticsearch-model/README.md +++ b/elasticsearch-model/README.md @@ -506,8 +506,8 @@ with a tool like [_Resque_](https://github.com/resque/resque) or [_Sidekiq_](htt class Article include Elasticsearch::Model - after_save { Indexer.perform_async(:index, self.id) } - after_destroy { Indexer.perform_async(:delete, self.id) } + after_save_commit { Indexer.perform_async(:index, self.id) } + after_destroy { Indexer.perform_async(:delete, self.id) } end ```