Skip to content

Commit 47e9f9e

Browse files
authored
Add twir-04-07-25 (#521)
1 parent 41a96f0 commit 47e9f9e

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
layout: post
3+
title: "TODO: add a title"
4+
categories: news
5+
author: Emmanuel Hayford
6+
og_image: assets/images/this-week-in-rails.png
7+
published: true
8+
date: 2025-07-04
9+
---
10+
11+
12+
Hi! [Emmanuel Hayford](https://x.com/siaw23) with some cool updates for you.
13+
14+
[Deprecated associations](https://github.com/rails/rails/pull/55285)
15+
16+
You can now mark associations as deprecated using:
17+
18+
`has_many :posts, deprecated: true`
19+
20+
Active Record will report any usage of the deprecated association. Three reporting modes are supported: `:warn (default)`, `:raise`, and `:notify`. You can also enable or disable backtraces (disabled by default).
21+
22+
[Add locale options to PostgreSQL adapter DB create](https://github.com/rails/rails/pull/55030) .
23+
24+
PostgreSQL adapter create DB now supports `locale_provider` and `locale`.
25+
26+
27+
[Fix `annotate` comments to propagate to `update_all`/`delete_all`](https://github.com/rails/rails/pull/55269) .
28+
29+
This PR fixes annotate comments to work with `update_all` and `delete_all`.
30+
31+
32+
[Rails New: Only add browser restrictions when using importmap](https://github.com/rails/rails/pull/55263) .
33+
34+
When you generate a new Rails application right now, it will block older browsers. This behavior makes sense if you are using [`importmap-rails`](https://github.com/rails/importmap-rails), but if you for example use jsbundling-rails, it does not. This PR suggests only adding this blocker when you are using importmap, and not for all Rails applications.
35+
36+
37+
[Implement ActiveSupport::BacktraceCleaner#clean_locations](https://github.com/rails/rails/pull/55255)
38+
39+
A new method `ActiveSupport::BacktraceCleaner#clean_locations` allows cleaning an array of `Thread::Backtrace::Location objects`:
40+
41+
`clean_locations = backtrace_cleaner.clean_locations(caller_locations)`
42+
43+
Filters and silencers still receive string representations, while the returned array retains the original `path` attributes, since `Location` objects are immutable.
44+
45+
46+
_You can view the whole list of changes [here](https://github.com/rails/rails/compare/@%7B2025-06-27%7D...main@%7B2025-07-04%7D)._
47+
_We had [18 contributors](https://contributors.rubyonrails.org/contributors/in-time-window/20250627-20250704) to the Rails codebase this past week!_
48+
49+
Until next time!
50+
51+
_[Subscribe](https://world.hey.com/this.week.in.rails) to get these updates mailed to you._

0 commit comments

Comments
 (0)