effective_resources 2.4.5 → 2.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/models/concerns/has_many_purgable.rb +2 -2
- data/lib/effective_resources/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: b34bdcaa231b87cff3e1f0ed43b8a1ecf7a8de5dfb784dae9dfcc677bb2a3754
|
|
4
|
+
data.tar.gz: 182008fc51596a0039e957fe9dfb49531c5e5b58466e4bf8d4f4d3f63d0091dd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b8a5e3bec0689b942e6bb95b8dc1ced888435dba9dc423a2b76684a88ce771ac7c1cbb6db6313f9f3c1454b4bee730d7571ab7a55ada80fcc341c042a729deb1
|
|
7
|
+
data.tar.gz: 0c983b39196510bbc506a2c8e6090310530632a015f68dfb5f99d13f65d4f1bac43dbbf82ebb6154eb4be7322562f7ea8f3903eced1ef1fb92f01a3b0762b7f8
|
|
@@ -71,7 +71,7 @@ module HasManyPurgable
|
|
|
71
71
|
|
|
72
72
|
def has_many_purgable_mark_for_destruction
|
|
73
73
|
has_many_purgable_attachments.each do |name|
|
|
74
|
-
Array(public_send(name)).each { |attachment| attachment.mark_for_destruction }
|
|
74
|
+
Array(public_send(name)).each { |attachment| attachment.mark_for_destruction unless attachment.new_record? }
|
|
75
75
|
end
|
|
76
76
|
|
|
77
77
|
true
|
|
@@ -80,7 +80,7 @@ module HasManyPurgable
|
|
|
80
80
|
def has_many_purgable_purge
|
|
81
81
|
has_many_purgable_attachments.each do |name|
|
|
82
82
|
Rails.logger.info "[has_many_purgable] Purging #{name} attachments"
|
|
83
|
-
Array(public_send(name)).each { |attachment| attachment.purge }
|
|
83
|
+
Array(public_send(name)).each { |attachment| attachment.purge if attachment.marked_for_destruction? }
|
|
84
84
|
end
|
|
85
85
|
|
|
86
86
|
true
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: effective_resources
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.4.
|
|
4
|
+
version: 2.4.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Code and Effect
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-03-
|
|
11
|
+
date: 2023-03-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|