lib/elasticsearch/model/indexing.rb in elasticsearch-model-0.1.4 vs lib/elasticsearch/model/indexing.rb in elasticsearch-model-0.1.5

- old
+ new

@@ -334,10 +334,10 @@ # @see http://rubydoc.info/gems/elasticsearch-api/Elasticsearch/API/Actions:update # def update_document(options={}) if changed_attributes = self.instance_variable_get(:@__changed_attributes) attributes = if respond_to?(:as_indexed_json) - changed_attributes.select { |k,v| self.as_indexed_json.keys.include? k } + self.as_indexed_json.select { |k,v| changed_attributes.keys.map(&:to_s).include? k.to_s } else changed_attributes end client.update(