From 112e49c77442f880dc73f694a6801cd098ee7567 Mon Sep 17 00:00:00 2001 From: Vanboom Date: Sat, 13 Jun 2020 16:27:26 -0500 Subject: [PATCH] fix #244 embedded attributes blocked by parent --- lib/mongoid/history/tracker.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mongoid/history/tracker.rb b/lib/mongoid/history/tracker.rb index 85d93978..24474bc3 100644 --- a/lib/mongoid/history/tracker.rb +++ b/lib/mongoid/history/tracker.rb @@ -95,7 +95,7 @@ def tracked_changes @tracked_changes ||= (modified.keys | original.keys).inject(HashWithIndifferentAccess.new) do |h, k| h[k] = { from: original[k], to: modified[k] }.delete_if { |_, vv| vv.nil? } h - end.delete_if { |k, v| v.blank? || !trackable_parent_class.tracked?(k) } + end.delete_if { |k, v| v.blank? } #|| !trackable_parent_class.tracked?(k) } end # Outputs summary of edit actions performed: :add, :modify, :remove, or :array.