better_record 0.19.10 → 0.20.2
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ca398ddfa56296c0537b21aa7c83b003a74c507c59dcc1485746c9779f86102
|
4
|
+
data.tar.gz: f74f6161b0289e13d2c3782da0c76f97dd3d133196d5d3f32d077dac303ac8af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3c8c042446cbd69db0e8bb546db34d813877141eb33159ad0db07304875ec48579848ad5fd32c829a6406c0c58014740c47987b76937a61785c0f43865b680f
|
7
|
+
data.tar.gz: 77eee27b978463e0a80fee412c1ac2d2bca757fdab7c33c9fbcaa14d8de90b1a9f75da8af0873462e8f58a26047ad04a43ddb624ce9a44a42499ddd1d0a5398d
|
@@ -21,12 +21,19 @@ module BetterRecord
|
|
21
21
|
type: blob.content_type
|
22
22
|
)
|
23
23
|
|
24
|
-
|
25
|
-
|
24
|
+
begin
|
25
|
+
record.
|
26
|
+
__send__ :delete_attachment, name, true
|
26
27
|
|
27
|
-
|
28
|
-
|
29
|
-
|
28
|
+
record.
|
29
|
+
reload.
|
30
|
+
__send__(name).
|
31
|
+
attach(attachment)
|
32
|
+
rescue
|
33
|
+
puts "Attachment No Longer Exists"
|
34
|
+
puts $!.message
|
35
|
+
puts $!.backtrace
|
36
|
+
end
|
30
37
|
|
31
38
|
puts "\n\nSAVED IMAGE\n\n"
|
32
39
|
begin
|
@@ -173,11 +173,11 @@ module BetterRecord
|
|
173
173
|
atchd = __send__ att_name
|
174
174
|
if atchd.attached?
|
175
175
|
begin
|
176
|
-
atch = ActiveStorage::Attachment.find_by(atchd.id)
|
176
|
+
atch = ActiveStorage::Attachment.find_by(id: atchd.id)
|
177
177
|
atch&.__send__ now ? :purge : :purge_later
|
178
178
|
rescue Exception
|
179
179
|
begin
|
180
|
-
ActiveStorage::Attachment.find_by(atchd.id).destroy
|
180
|
+
ActiveStorage::Attachment.find_by(id: atchd.id).destroy
|
181
181
|
rescue Exception
|
182
182
|
end
|
183
183
|
end
|
metadata
CHANGED
@@ -1,35 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: better_record
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.20.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sampson Crowley
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03
|
11
|
+
date: 2019-04-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: 5.2.0
|
20
17
|
- - "~>"
|
21
18
|
- !ruby/object:Gem::Version
|
22
|
-
version: '5
|
19
|
+
version: '5'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 5.2.2.1
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
|
-
- - ">="
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: 5.2.0
|
30
27
|
- - "~>"
|
31
28
|
- !ruby/object:Gem::Version
|
32
|
-
version: '5
|
29
|
+
version: '5'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 5.2.2.1
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: pg
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -351,7 +351,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
351
351
|
- !ruby/object:Gem::Version
|
352
352
|
version: '0'
|
353
353
|
requirements: []
|
354
|
-
rubygems_version: 3.0.
|
354
|
+
rubygems_version: 3.0.3
|
355
355
|
signing_key:
|
356
356
|
specification_version: 4
|
357
357
|
summary: Fix functions that are lacking in Active record to be compatible with multi-app
|