惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

阮一峰的网络日志
阮一峰的网络日志
J
Java Code Geeks
Martin Fowler
Martin Fowler
宝玉的分享
宝玉的分享
V
Visual Studio Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
M
MIT News - Artificial intelligence
U
Unit 42
博客园 - 三生石上(FineUI控件)
博客园 - 聂微东
The GitHub Blog
The GitHub Blog
I
InfoQ
WordPress大学
WordPress大学
H
Help Net Security
D
Docker
B
Blog
腾讯CDC
A
About on SuperTechFans
Recent Announcements
Recent Announcements
雷峰网
雷峰网
有赞技术团队
有赞技术团队
C
Check Point Blog
Y
Y Combinator Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC

Ruby on Rails: Compress the complexity of modern web apps

Safer to_i coercion, custom to_fs formats, and more! This Week in Rails: May 16, 2026 This Week in Rails: May 8, 2026 This Week in Rails: May 1, 2026 Active Record gets better every week Great big Rails World 2026 update: CFP, Corporate Support tickets, workshops Query command for database queries and more Explicit query: and body: kwargs for integration tests and more! Speedup ActiveRecord::LogSubscriber#sql_color and more! This Week in Rails: March 27, 2026 Rails Versions 8.0.5 and 8.1.3 have been released! Rails Versions 7.2.3.1, 8.0.4.1, and 8.1.2.1 have been released! This Week in Rails: March 20, 2026 Validate URI scheme in Action Text and more This Week in Rails: March 6, 2026 Planning Center is the newest Rails Foundation Contributing member Action Text gets Markdown conversion, editor links in devcontainers, and more! BARRA seeks Rails developer Joe Agliozzo is looking for a Rails developer The rise of lighttpd as the alternative web server When longer is better and more is more Snowdevil: First e-tailer on Rails Natural selection for frameworks in Ruby vs Java Address book tutorial in Portuguese Becoming a better programmer with Rails 10 Things Every Java Programmer Should Know About Ruby Really Getting Started in Rails Off the Treadmill, Onto the Rails Rails 0.9.5: A world of fixes and tweaks Rich clients with Rails and XUL
Immutable Rails Cache Header, Local Assigns in Strict Loc...
David Heinemeier Hansson · 2024-06-28 · via Ruby on Rails: Compress the complexity of modern web apps

Friday, June 28, 2024
Posted by zzak

Hi, it’s zzak. Let’s explore this week’s changes in the Rails codebase.

Support “immutable” directive in Cache-Control
This PR adds a new option to the expires_in method to support the immutable directive for the “Cache-Control” header.

Also pass “local_assigns” to strict locals templates
When using Strict Locals in a partial, local_assigns is now passed to the view in order to workaround an issue where trying to access the default values of a name that is also a reserved Ruby keyword.

Fix mailer templates to be RuboCop compliant
An issue was fixed with the mailer generator and scaffolding to make the generated code RuboCop compliant. This would impact newly generated apps, that create a mailer or a scaffold would immediately fail in the generated CI configuration by default.

Correctly generate Devcontainer setting for applications that using mysql2 gem
This PR ensures that applications using the mysql2 gem for their database adapter still work with the devcontainer command.

Don’t make rdoc generation take an unreasonable amount of time
Due to a bug in RDoc, which was only discovered recently, the docs-preview pipeline in Rails CI was taking far too long to finish. I hope you are taking advantage of this pipeline when submitting PRs to update Rails documentation.

Add a config for preserving timezone information when calling “to_time” on TimeWithZone object
When using Active Support’s to_time method on a TimeWithZone object, you can now configure whether to preserve the timezone or use the UTC offset.

Improve performance of Active Storage Mirror Service
This started as a FIXME in the original Active Storage implementation for Mirror Service, but now methods being called across all services are done using threads. This should improve the performance for uploads, especially if there are multiple mirrors, however you should be aware that the underlying service must be thread-safe.

Add condensed #inspect for Pool, Adapter, Config
Previously, it was very easy to accidentally leak a database password in production logs if an error ends up calling inspect on a ConnectionPool or an individual connection (Adapter). This is due to the default #inspect output for Pools and Adapters being unnecessarily large, and both currently including passwords (through the DatabaseConfig of a Pool, and the internal configuration of an Adapter).

Use Thor for built-in stats task
Currently, we use both Thor and Rake for bin/rails commands. We eventually want to get all the built-ins task promoted to Thor Commands. This migrates the stats task to Thor and deprecates the use of bin/rake stats directly.

You can view the whole list of changes here. We had 24 contributors to the Rails codebase this past week!

Until next time!

Subscribe to get these updates mailed to you.