Skip to content

Commit a7f8388

Browse files
committed
change title
1 parent b1e42a2 commit a7f8388

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

posts/2025-09-25-before-upgrading-to-rails-8-update-to-json-2-14-0.md renamed to posts/2025-09-25-duplicate-keys-sneaking-into-our-JSON-responses.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
---
2-
title: "Before upgrading to Rails 8, update to JSON 2.14.0 to avoid being hit by strings vs symbols"
32
created_at: 2025-09-25
43
author: Piotr Jurewicz
54
tags: ['rails', 'ruby', 'json', 'rails upgrade']
65
publish: false
76
---
87

9-
# Before upgrading to Rails 8, update to JSON 2.14.0 to avoid being hit by strings vs symbols
8+
# Rails 8 upgrade story: duplicate keys sneaking into our JSON responses
109

1110
The upgrade from **Rails 7.2.2.2 to 8.0.2.1** went surprisingly smoothly.
1211
After deployment, we didn’t notice any new exceptions, and the application seemed stable.
@@ -28,7 +27,7 @@ We had something like this:
2827
attributes.merge(id: public_id)
2928
```
3029

31-
The intention was simple: replace the primary key with a public identifier used for inter-service communication.
30+
The intention was simple: replace the private database ID with a public identifier used for inter-service communication.
3231

3332
The problem? `attributes` returns a hash with **string keys**, and we were merging in a value under a **symbol key**.
3433
The result was a hash with both keys:

0 commit comments

Comments
 (0)