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

Conversation

notapatch
Copy link
Contributor

I was trying to add re-indexing hooks to my program, by following the elasticsearch-model/README, and was getting the error (undefined local variable or method `index_document'). I changed the example to this (see below) and things worked as expected:

    after_commit on: [:create, :update] do
      __elasticsearch__.index_document
    end

    after_commit on: [:destroy] do
      __elasticsearch__.delete_document
    end

I wondered if the README needed updating? If so, I have added this pull request.

@karmi
Copy link
Contributor

karmi commented Feb 2, 2015

@RichardWigley Yeah!, that's true -- can you please sign the CLA so I can merge the contribution?

@notapatch
Copy link
Contributor Author

I googled elasticsearch and CLA and signed a CLA - I hope that is what was required.

@karmi karmi closed this in bd9b2fb Feb 2, 2015
@karmi
Copy link
Contributor

karmi commented Feb 2, 2015

@RichardWigley You've found the correct thing :) -- commit merged, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants