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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fd952639925581e1a9402a4e1542ca8be34e826ee23754742381daea8465f59d
4
- data.tar.gz: 061f01b40c568b24b9c383558c63f87bf29e27ded41192ae30d5afc0106294af
3
+ metadata.gz: c3c3f592e6fe0beb099dd3d0cec1d0bbc02fe79ef20acc193169bcbf89082aee
4
+ data.tar.gz: c6f278bb704653d5cc21ff088c80623c53c69abce995694bfe5e37b9bfccb4fe
5
5
  SHA512:
6
- metadata.gz: 25f107a0f99f1e951a5ec5c83115aab53c90676ffbc9652e170566fbd933fa61a18e1649a0a885a29e935fd08aa27dcc26450632c86c69230792cc48f5e6c799
7
- data.tar.gz: a231c2bfc1aefd7d56b537c41d5a0f887660a4b4d842e1f066a6e65057402471fe8be1fc456eecb92c901f4e8b45bd13308a6c2a84c7c1f1b8343a7e14463108
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
- touch_records klass, columns, records
114
+ records.reject!(&:destroyed?)
115
+ touch_records klass, columns, records if records.present?
115
116
  end
116
117
  end
117
118
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-batch_touching
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.pre.beta2
4
+ version: 1.0.pre.beta3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Morearty