Skip to content

Commit bd9b2fb

Browse files
notapatchkarmi
authored andcommitted
[MODEL] Fixed incorrect instructions for custom indexing callbacks in the README
Closes elastic#328
1 parent e5c61b2 commit bd9b2fb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

elasticsearch-model/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -432,15 +432,15 @@ class Article < ActiveRecord::Base
432432
include Elasticsearch::Model
433433

434434
after_commit on: [:create] do
435-
index_document if self.published?
435+
__elasticsearch__.index_document if self.published?
436436
end
437437

438438
after_commit on: [:update] do
439-
update_document if self.published?
439+
__elasticsearch__.update_document if self.published?
440440
end
441441

442442
after_commit on: [:destroy] do
443-
delete_document if self.published?
443+
__elasticsearch__.delete_document if self.published?
444444
end
445445
end
446446
```

0 commit comments

Comments
 (0)