activerecord-batch_touching 1.0.pre.beta2 → 1.0.pre.beta3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/activerecord/batch_touching.rb +2 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3c3f592e6fe0beb099dd3d0cec1d0bbc02fe79ef20acc193169bcbf89082aee
|
4
|
+
data.tar.gz: c6f278bb704653d5cc21ff088c80623c53c69abce995694bfe5e37b9bfccb4fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2fb2776ed67057081efd3103932e6f740d39a6c55f5840b1bcc184aab845e1ce08fbd68e9824bc911ea0c41b1df830d6f9a4f014deadd7c49691f5b72a314ad5
|
7
|
+
data.tar.gz: 34d7055a78683221bfe8883ee0deb9643a973bf005ff2c3c1987abd65e11489c6306079ec17e1ede9384194c6fd709a598c2ad6434d33b982a786f917e51cbfd
|
@@ -111,7 +111,8 @@ module ActiveRecord
|
|
111
111
|
# Sort by class name. Having a consistent order can help mitigate deadlocks.
|
112
112
|
sorted_records = all_states.records.keys.sort_by { |k| k.first.name }.map { |k| [k, all_states.records[k]] }.to_h
|
113
113
|
sorted_records.each do |(klass, columns), records|
|
114
|
-
|
114
|
+
records.reject!(&:destroyed?)
|
115
|
+
touch_records klass, columns, records if records.present?
|
115
116
|
end
|
116
117
|
end
|
117
118
|
|