easy-admin-rails 0.1.12 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 753374710cf8baa069c17f015b526b0c1b36e6d1378040b857470b059b696a6d
4
- data.tar.gz: f1b3c9029b94a5bb9dbdd0573ecbc20d98deca312987663dc033c749e13d50cd
3
+ metadata.gz: 8d4b94ae313746eb609f463d8619257aac914b00204f9fccb934c8a83cbbba2d
4
+ data.tar.gz: 3d5165ff34936522ee840039050fd15b740c47395b45f8b4276473cd24c9d0d9
5
5
  SHA512:
6
- metadata.gz: 271d6b18787c5dc6da02d38fb01a499b4df5bb447a964c0387f632bb38dd23081ccb8d12228e412c162975f29ec6d87c02f6895bbbaafee9dd8c23e5cde97c7e
7
- data.tar.gz: b50605e208a7180f2049829bed5a9cda3d144785b5c1fc4382bbf3d97c570e1b6308dc54df7e2a97135fdfbbe5ef0f46f02ea152cd66db50ad5917de980fff7d
6
+ metadata.gz: 13f097fbf6b65704d148e394c4c36a87192ffb1c163eda942751cefe8808aa3179ab6024ff79e489c9b0dcf5fa41067990501843690c60d16b6a18af6a0b2f73
7
+ data.tar.gz: bc610d094b4c1c1aa73ec20b572e49ba1935b46903b4ea25d6608c68f5ee201cb54034101595fb9284252d712eae2ca86cf7f24923c837953fac8d34ea3206bb
@@ -122,7 +122,6 @@ module EasyAdmin
122
122
  begin
123
123
  old_attrs = parse_version_object(@version.object)
124
124
  current_item = @version.item
125
-
126
125
  return {} unless current_item && old_attrs.is_a?(Hash)
127
126
 
128
127
  changes = {}
@@ -278,10 +278,13 @@ module EasyAdmin
278
278
  changes = {}
279
279
  current_attrs = current_item.attributes
280
280
 
281
- # Compare old and new attributes
282
- (old_attrs.keys + current_attrs.keys).uniq.each do |key|
281
+ # Only check fields that exist in the old_attrs (were tracked by Paper Trail)
282
+ old_attrs.keys.each do |key|
283
283
  next if skip_field?(key)
284
284
 
285
+ # Skip if field wasn't tracked in this version
286
+ next unless old_attrs.has_key?(key)
287
+
285
288
  old_val = normalize_value_for_comparison(old_attrs[key])
286
289
  new_val = normalize_value_for_comparison(current_attrs[key])
287
290
 
@@ -1,3 +1,3 @@
1
1
  module EasyAdmin
2
- VERSION = "0.1.12"
2
+ VERSION = "0.1.13"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy-admin-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.12
4
+ version: 0.1.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Slaurmagan