esse-active_record 0.3.3 → 0.3.4

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: 9927e9810121b26ea8b9288532ce8868326a48388a3ede20afd5722f3d3b8828
4
- data.tar.gz: 9851522354c3c42fef276d2f2a84a6b85bf192f5d482f82676861710bdf01828
3
+ metadata.gz: 36873df931f4f1169fefa6e411417b4639218af434ccad541d851cb3a060dcfe
4
+ data.tar.gz: 500b9266326fd5bea838c09b06f836e6f3f20a9c7482df1dd392ab64759ac71d
5
5
  SHA512:
6
- metadata.gz: befe01d6e114cdec51fed21dcd4928d0f080a3de13e63879e9db67797518a4a7555d86d98a6175e94587e90c98730528d451aabaa4adc4c96cebb62d60704872
7
- data.tar.gz: 00b61f1dbbe7efc9a1ee7b37361b120faa254ccddc4fe40e26411fa075bf27b0de6b8d970b9afae4a9e13b8407b241b434e5a51c125efaad67a4da70afed7bdb
6
+ metadata.gz: cac26d6c6d3c13e0081989925e695b64beaf968409644ed3b45ca8a771c7bc0df3fc22a35762adb94a0b1505e82df3f4541eaf18c3dffc45766867f2bb7428f0
7
+ data.tar.gz: a65f7bbb4329e39ebc463f2b6342c113fcf42f444879fdefe765db37aabd30fb49905b2521533d323765af44643fca5c27c2156de891bc1fbfe10a00cb3653a6
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- esse-active_record (0.3.3)
4
+ esse-active_record (0.3.4)
5
5
  activerecord (>= 4.2, < 8)
6
6
  esse (>= 0.3.0)
7
7
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- esse-active_record (0.3.3)
4
+ esse-active_record (0.3.4)
5
5
  activerecord (>= 4.2, < 8)
6
6
  esse (>= 0.3.0)
7
7
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- esse-active_record (0.3.3)
4
+ esse-active_record (0.3.4)
5
5
  activerecord (>= 4.2, < 8)
6
6
  esse (>= 0.3.0)
7
7
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- esse-active_record (0.3.3)
4
+ esse-active_record (0.3.4)
5
5
  activerecord (>= 4.2, < 8)
6
6
  esse (>= 0.3.0)
7
7
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- esse-active_record (0.3.3)
4
+ esse-active_record (0.3.4)
5
5
  activerecord (>= 4.2, < 8)
6
6
  esse (>= 0.3.0)
7
7
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- esse-active_record (0.3.3)
4
+ esse-active_record (0.3.4)
5
5
  activerecord (>= 4.2, < 8)
6
6
  esse (>= 0.3.0)
7
7
 
@@ -19,8 +19,11 @@ module Esse::ActiveRecord
19
19
  update_document(document)
20
20
  return true unless document.routing
21
21
 
22
- prev_record = model.class.new(model.attributes.merge(model.previous_changes.transform_values(&:first))).tap(&:readonly!)
23
- prev_document = repo.serialize(prev_record)
22
+ prev_record = model.class.new
23
+ model.attributes.merge(model.previous_changes.transform_values(&:first)).each do |key, value|
24
+ prev_record[key] = value
25
+ end
26
+ prev_document = repo.serialize(prev_record.tap(&:readonly!))
24
27
 
25
28
  return true unless prev_document
26
29
  return true if [prev_document.id, prev_document.routing].include?(nil)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Esse
4
4
  module ActiveRecord
5
- VERSION = '0.3.3'
5
+ VERSION = '0.3.4'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: esse-active_record
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcos G. Zimmermann
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-07-11 00:00:00.000000000 Z
11
+ date: 2024-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: esse