elasticsearch/elasticsearch-rails — pull request #196 by bdmac (2014-08-11 20:25:07+00:00)
Title: Call import on proxy object

elasticsearch-model is very careful to not override any method names on
model classes if they already exist. When this happens you have to use
the __elasticsearch__ proxy object directly. That's great but the
elasticsearch-rails import rake task does not respect that.

In our case there is a conflict with the activerecord-import gem which
defines an import method on ActiveRecord::Base. The way the rake task
was written it was ending up calling activerecord-import's version of
import instead of elasticsearch-model's version.

This change simply forces the rake task to use the proxy object.