avo-diff_field 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: da9d29d720f209c89b14ffe67440ac06e2f371caabe3bf7b81360e6294ff968c
4
- data.tar.gz: 9982811eecd21d09062bb6f4cc43cd47e981ba7704083355bd53c491144bfd81
3
+ metadata.gz: 4e31ee26f39ea5c8924d1b2b57a762f469ed63a2a67f1a4d6150c51154bca90f
4
+ data.tar.gz: 0f408416ccb652ea23872e50fa5882f894382a8091ad16dafb2baf4b18ca0113
5
5
  SHA512:
6
- metadata.gz: 9620dd267bf03fc42851da1b0e0bf80605aa70b840790e787e6e572d5dbe1d60a33cd399ee0780a8c853d70048cdd16abf3479f8484166308073139486027c4d
7
- data.tar.gz: 040c9fc118304a65d4e3f90b498e28c82acedcc2e73b32ebbcac5987eaa8a2ced61e7cd69e0a664145e59ca448d23d4f24279cb464a508b2badcc384bb086907
6
+ metadata.gz: fe546b8418c5e00e9555cfb6daa9e43e4821aa0cbeeb92517748690b67177203a2e85beb8b5621342c12118db54e2e62d7fc6d423070986b954da49ac62d5280
7
+ data.tar.gz: 50c330532a62d9c727fbca0165ea9e75a4d67b956d629186914bc4fb4e33a76ed3fb4f189a466ee17b9ba31339118538c23f5c22542bf1b855141e77d20f87f7
@@ -4,7 +4,7 @@ class Avo::DiffField::Fields::DiffField::ShowComponent < Avo::Fields::ShowCompon
4
4
  def initialize **args
5
5
  super(**args)
6
6
  @diffy_value = @field.value&.map do |k, v|
7
- case @field.record.action
7
+ case @field.record.try(:action) || @field.record.try(:event)
8
8
  when 'update'
9
9
  left_value = v[0]
10
10
  right_value = v[1]
@@ -1,4 +1,3 @@
1
- require_relative "fields/diff_field"
2
1
  require "diffy"
3
2
 
4
3
  module Avo
@@ -1,5 +1,5 @@
1
1
  module Avo
2
2
  module DiffField
3
- VERSION = "0.0.2" unless const_defined?(:VERSION)
3
+ VERSION = "0.0.3" unless const_defined?(:VERSION)
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avo-diff_field
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrian Marin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-01 00:00:00.000000000 Z
11
+ date: 2024-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: diffy
@@ -59,7 +59,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
59
59
  - !ruby/object:Gem::Version
60
60
  version: '0'
61
61
  requirements: []
62
- rubygems_version: 3.5.5
62
+ rubygems_version: 3.5.22
63
63
  signing_key:
64
64
  specification_version: 4
65
65
  summary: Diff field for Avo.