|
| 1 | +--- |
| 2 | +layout: post |
| 3 | +title: "Refactoring Active Record Signed ID verifiers" |
| 4 | +categories: news |
| 5 | +author: zzak |
| 6 | +og_image: assets/images/this-week-in-rails.png |
| 7 | +published: true |
| 8 | +date: 2025-04-11 |
| 9 | +--- |
| 10 | + |
| 11 | + |
| 12 | +Hi, it's [zzak](https://github.com/zzak). Hopefully everyone got their Rails World CFPs in on time! Let's explore this week's changes in the Rails codebase. |
| 13 | + |
| 14 | +[Allow allocated Active Records to lookup associations](https://github.com/rails/rails/pull/54892) |
| 15 | +Previously, the association cache isn't setup on allocated record objects, so association lookups will crash. |
| 16 | +Test frameworks like mocha use allocate to check for stubbable instance methods, which can trigger an association lookup. |
| 17 | + |
| 18 | +[ActiveRecord Signed ID with global Rails.application.message_verifiers](https://github.com/rails/rails/pull/54422) |
| 19 | +This change ensures a unified configuration for all message verifiers, making it easier to rotate secrets and upgrade signing algorithms. |
| 20 | +See [`message_verifiers`](https://api.rubyonrails.org/classes/Rails/Application.html#method-i-message_verifiers) for more details. |
| 21 | + |
| 22 | +[Allow enabling unencrypted data fallback at a per-attribute level](https://github.com/rails/rails/pull/51100) |
| 23 | +Previously the global configuration for `support_unencrypted_data` could be overridden on a per-attribute bases to disable it, but not the other way around. |
| 24 | + |
| 25 | +[Fix "create_or_find_by" not rolling back a transaction](https://github.com/rails/rails/pull/54845) |
| 26 | +This change addresses an edge case when rolling back a transaction inside a nested transaction would be silently ignored. |
| 27 | + |
| 28 | +[Add support for filtering notes by tag in "/rails/info/notes"](https://github.com/rails/rails/pull/54876) |
| 29 | +When viewing the Rails notes browser, you can now filter by tag, like "FIXME," "TODO," and "OPTIMIZE". |
| 30 | + |
| 31 | +[Fix "Enumerable#sole" for infinite collections](https://github.com/rails/rails/pull/54341) |
| 32 | +This PR optimizes the `Enumerable#sole` method to handle infinite collections more efficiently. |
| 33 | + |
| 34 | + |
| 35 | +_You can view the whole list of changes [here](https://github.com/rails/rails/compare/@%7B2025-04-04%7D...main@%7B2025-04-11%7D)._ |
| 36 | +_We had [15 contributors](https://contributors.rubyonrails.org/contributors/in-time-window/20250404-20250411) to the Rails codebase this past week!_ |
| 37 | + |
| 38 | +Until next time! |
| 39 | + |
| 40 | +_[Subscribe](https://world.hey.com/this.week.in.rails) to get these updates mailed to you._ |
0 commit comments