We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
@__changed_attributes
1 parent 6356fdc commit 9c62c3eCopy full SHA for 9c62c3e
elasticsearch-model/lib/elasticsearch/model/indexing.rb
@@ -175,7 +175,7 @@ def self.included(base)
175
# @see #update_document
176
#
177
base.before_save do |instance|
178
- instance_variable_set(:@__changed_attributes,
+ instance.instance_variable_set(:@__changed_attributes,
179
Hash[ instance.changes.map { |key, value| [key, value.last] } ])
180
end if base.respond_to?(:before_save) && base.instance_methods.include?(:changed_attributes)
181
end
0 commit comments