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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c889dd875e46d15586b303a33c9fe159b80e7a26d1cf3eb77ba946e5d8d605ff
4
- data.tar.gz: 95ea771725ffc57619a2bc3371ce6b98f1b61cfb6924ce6471b028db0aeb3563
3
+ metadata.gz: 3f065c42ed2f757f8bbd3ed001d303bcd81a1b492f661e9a37226579009a2561
4
+ data.tar.gz: b4ff34b56c8a3deb7daa4f29e83ba38f715072c1544a6c8aeddbc5b81a4694bd
5
5
  SHA512:
6
- metadata.gz: 6e0e3abad03c8c153bbf8457e56829540504651bab131e50d3a5c9232c33f265b0a0c321e1bdcfec680ae11d060a76767b0232008dec77766050bdbe011dcf3f
7
- data.tar.gz: 3b2a87d562f8cf12a959485fed87f43e1ae799a2f58f5fb510a6a71491aa9ae40349584910d4d832630776c7077017d26e17ae613debaade5982864e55a33687
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.merge! record_type:, record_id:
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveShrine
4
- VERSION = "0.7.1"
4
+ VERSION = "0.7.2"
5
5
  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.1
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-04-16 00:00:00.000000000 Z
11
+ date: 2026-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties