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 +4 -4
- data/Gemfile.lock +1 -1
- data/ci/Gemfile.rails-5.2.lock +1 -1
- data/ci/Gemfile.rails-6.0.lock +1 -1
- data/ci/Gemfile.rails-6.1.lock +1 -1
- data/ci/Gemfile.rails-7.0.lock +1 -1
- data/ci/Gemfile.rails-7.1.lock +1 -1
- data/lib/esse/active_record/callbacks/indexing_on_update.rb +5 -2
- data/lib/esse/active_record/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36873df931f4f1169fefa6e411417b4639218af434ccad541d851cb3a060dcfe
|
4
|
+
data.tar.gz: 500b9266326fd5bea838c09b06f836e6f3f20a9c7482df1dd392ab64759ac71d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cac26d6c6d3c13e0081989925e695b64beaf968409644ed3b45ca8a771c7bc0df3fc22a35762adb94a0b1505e82df3f4541eaf18c3dffc45766867f2bb7428f0
|
7
|
+
data.tar.gz: a65f7bbb4329e39ebc463f2b6342c113fcf42f444879fdefe765db37aabd30fb49905b2521533d323765af44643fca5c27c2156de891bc1fbfe10a00cb3653a6
|
data/Gemfile.lock
CHANGED
data/ci/Gemfile.rails-5.2.lock
CHANGED
data/ci/Gemfile.rails-6.0.lock
CHANGED
data/ci/Gemfile.rails-6.1.lock
CHANGED
data/ci/Gemfile.rails-7.0.lock
CHANGED
data/ci/Gemfile.rails-7.1.lock
CHANGED
@@ -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
|
23
|
-
|
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)
|
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.
|
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
|
+
date: 2024-07-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: esse
|