active_shrine 0.7.1 → 0.7.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 +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/active_shrine/attachment.rb +7 -1
- data/lib/active_shrine/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: 3f065c42ed2f757f8bbd3ed001d303bcd81a1b492f661e9a37226579009a2561
|
|
4
|
+
data.tar.gz: b4ff34b56c8a3deb7daa4f29e83ba38f715072c1544a6c8aeddbc5b81a4694bd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 69ea2bf8b0e93d7686d867096726440cce536c764d486ea88663f0054833ea5c985bcb6b1619205f9689bcb132679045779075a5acb1e9f21e0fc6205bf3ab00
|
|
7
|
+
data.tar.gz: e17ac504880cde68f96a2f3b5d0ec66362bd3813c2da9e593050367bd9414900c6f755fdd1ba2541a7b65c61906c6a111cdf8d20955bc0edbae410e18ce09bac
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [0.7.2] - 2026-08-16
|
|
4
|
+
|
|
5
|
+
- Store the record pointer in attachment metadata under string keys, so it is no longer duplicated as both symbols and strings
|
|
6
|
+
|
|
3
7
|
## [0.7.1] - 2026-04-16
|
|
4
8
|
|
|
5
9
|
- Bridge attacher errors to `record.errors` on `has_many_attached`
|
|
@@ -116,7 +116,13 @@ module ActiveShrine
|
|
|
116
116
|
def maybe_store_record
|
|
117
117
|
return unless record.present?
|
|
118
118
|
|
|
119
|
-
metadata
|
|
119
|
+
# String keys, because metadata comes back from its JSON column with
|
|
120
|
+
# string keys and this runs on every save. Merging symbols in left the
|
|
121
|
+
# pointer under both spellings, which the json gem warns about now and
|
|
122
|
+
# refuses from 3.0. Shrine persists again from its own after_save, so
|
|
123
|
+
# an attachment that receives a file after its row exists saves twice
|
|
124
|
+
# and hits this on the second pass.
|
|
125
|
+
metadata.merge!("record_type" => record_type, "record_id" => record_id)
|
|
120
126
|
end
|
|
121
127
|
end
|
|
122
128
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: active_shrine
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.7.
|
|
4
|
+
version: 0.7.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Radioactive Labs
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-08-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: railties
|