Skip to content

Commit 4a78af2

Browse files
authored
add this week in Rails (#440)
1 parent 378cf56 commit 4a78af2

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
layout: post
3+
title: "Devcontainers without VSCode, a deprecation and more!"
4+
categories: news
5+
author: Greg
6+
og_image: assets/images/this-week-in-rails.png
7+
published: true
8+
date: 2025-01-24
9+
---
10+
11+
12+
Hi, it's [Greg](greg.molnar.io). Let's explore this week's changes in the Rails codebase.
13+
14+
[Eliminate queries loading dumped model schema on Postgres](https://github.com/rails/rails/pull/54333)
15+
This pull request improves resiliency by avoiding the need to open a database connection to load the type map, while defining attribute methods at boot, when a schema cache file is configured on PostgreSQL databases.
16+
17+
[Allow passing in a date or time to ActiveSupport::Testing::TimeHelpers#freeze_time](https://github.com/rails/rails/pull/54303)
18+
This change allows the `#freeze_time` testing helper to accept a date or time argument.
19+
20+
```ruby
21+
Time.current # => Sun, 09 Jul 2024 15:34:49 EST -05:00
22+
freeze_time Time.current + 1.day
23+
sleep 1
24+
Time.current # => Mon, 10 Jul 2024 15:34:49 EST -05:00
25+
```
26+
27+
[Make column name optional for _index_exists?_](https://github.com/rails/rails/pull/54298)
28+
This pull request makes the column name optional for `index_exists?`. It aligns well with `remove_index` signature, where the index name doesn't need to be derived from the column names.
29+
30+
[Add a script for using dev containers outside VSCode](https://github.com/rails/rails/pull/54285)
31+
I you want to use the devcontainer info, but don't want to use VSCode, the small script added by this pull request will be handy. It reads the devcontainer JSON file and runs docker commands based on the information in the JSON file.
32+
33+
[Add _application-name_ metadata to application layout](https://github.com/rails/rails/pull/54257)
34+
To better support Progressive Web Apps(PWAs), this pull request adds an
35+
`application-name` meta tag to application layout.
36+
37+
[JSON serialized attributes can return symbolized keys](https://github.com/rails/rails/pull/54172)
38+
With this change, options can now be passed to `ActiveRecord::Coder::JSON` when instantiating the coder. This allows to pass in the `symbolize_names` option for instance:
39+
40+
```ruby
41+
serialize :config, coder: ActiveRecord::Coder::JSON.new(symbolize_names: true)
42+
```
43+
44+
[Deprecate _insert_all_ with unpersisted associations](https://github.com/rails/rails/pull/53920)
45+
This pull request deprecates using `insert_all`/`upsert_all` with unpersisted records in associations. Using these methods on associations containing unpersisted records will now show a deprecation warning, as the unpersisted records will be lost after the operation. This will become an error in Rails 8.2.
46+
47+
_You can view the whole list of changes [here](https://github.com/rails/rails/compare/@%7B2025-01-17%7D...main@%7B2025-01-24%7D)._
48+
_We had [34 contributors](https://contributors.rubyonrails.org/contributors/in-time-window/20250117-20250124) to the Rails codebase this past week!_
49+
50+
Until next time!
51+
52+
_[Subscribe](https://world.hey.com/this.week.in.rails) to get these updates mailed to you._

0 commit comments

Comments
 (0)