Skip to content

elasticsearch-model/README - update index_document with __elasticsearch_... #328

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions elasticsearch-model/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -432,15 +432,15 @@ class Article < ActiveRecord::Base
include Elasticsearch::Model

after_commit on: [:create] do
index_document if self.published?
__elasticsearch__.index_document if self.published?
end

after_commit on: [:update] do
update_document if self.published?
__elasticsearch__.update_document if self.published?
end

after_commit on: [:destroy] do
delete_document if self.published?
__elasticsearch__.delete_document if self.published?
end
end
```
Expand Down