Skip to content

Commit 9c62c3e

Browse files
committed
[MODEL] Set the @__changed_attributes variable correctly in "Indexing" module
1 parent 6356fdc commit 9c62c3e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

elasticsearch-model/lib/elasticsearch/model/indexing.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def self.included(base)
175175
# @see #update_document
176176
#
177177
base.before_save do |instance|
178-
instance_variable_set(:@__changed_attributes,
178+
instance.instance_variable_set(:@__changed_attributes,
179179
Hash[ instance.changes.map { |key, value| [key, value.last] } ])
180180
end if base.respond_to?(:before_save) && base.instance_methods.include?(:changed_attributes)
181181
end

0 commit comments

Comments
 (0)