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

推荐订阅源

IT之家
IT之家
aimingoo的专栏
aimingoo的专栏
H
Help Net Security
L
LangChain Blog
M
MIT News - Artificial intelligence
The GitHub Blog
The GitHub Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
C
Check Point Blog
P
Proofpoint News Feed
J
Java Code Geeks
大猫的无限游戏
大猫的无限游戏
博客园_首页
Blog — PlanetScale
Blog — PlanetScale
U
Unit 42
I
InfoQ
月光博客
月光博客
爱范儿
爱范儿
Stack Overflow Blog
Stack Overflow Blog
V
Visual Studio Blog
Y
Y Combinator Blog
Microsoft Security Blog
Microsoft Security Blog
博客园 - Franky
D
Docker
B
Blog

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
Active Support's NotificationAssertions and `sql.active_r...
David Heinemeier Hansson · 2024-11-22 · via Ruby on Rails: Compress the complexity of modern web apps

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

Add Active Support Notifications test helper module
This PR has been created because it’s currently cumbersome to test that a certain code block/action triggers an ActiveSupport::Notifications::Event to be emitted. It would be ideal to have some helpers to assert against such event emission. Have heard such helpers could be helpful internal to Rails as well.

Add “affected_rows” to “sql.active_record” event
The recently added row_count value is very useful for identifying cases where a query would return a large result set as large results can end up using a lot of memory or even be blocked by databases like Vitess.
However, somewhere that row_count falls short is for queries that do not necessarily return their results back to the client. These queries that affect too many rows can lead to their own set of problems, such as overwhelming replication and causing replication lag.

Allow “hidden_field” tag to accept a custom autocomplete value
In #43280 autocomplete="off" was enforced for all hidden inputs generated by Rails to fix a firefox bug. Unfortunately it’s also a legitimate use-case to specify an autocomplete with a value such as username and a value on a hidden input. This hints to the browser that (in this example) the username of a password reset form is what we’ve provided as the value and the password manager can store it as such.

Allow to reset cache counters for multiple records
There is often a need to reset counter caches for multiple records. Achieving this before will generate many extra queries.

Allow setting content type with a symbol of the Mime Type

# Before
response.content_type = "text/html"

# After
response.content_type = :html

Parallel tests with :number_of_processors uses cgroups-aware usable processor count
When using parallel tests the default will now try to allocate a worker pool based of the total number of processors available to the system.

Fix Mysql2Adapter support for prepared statements
If you’re using the Mysql2 adapter and rely on prepared statements, you may want to wait for the next bug-fix release before upgrading to Rails 8.0.

Silence deprecate message during “app:update” command
When running the app:update command you previously may see warnings due to not adopting the new_framework_defaults. This PR silences those messages to avoid confusion.

Reword error message for NoDatabaseError
This patch adds some suggestions on what to do when you run into this error.

Redesign ActionView::Template::Handlers::ERB.find_offset to handle edge cases
Some excellent work was put into improving the ERB template error highlighting in this PR, as well as fixing a bug with multibyte character tokenization.

Make column_definitions queries retryable
Previously when an application wasn’t using a schema cache in production a ping query would be executed for each table when it was loaded the first time.

Make Action Dispatch Session#store method conform to Rack spec
The Rack specification states that a hash-like object stored in environment with rack.session key must implement store/2 method with []= semantics.

Preserve timezone and locale in ActiveJob exception handlers
This PR fixes a bug where the job locale and timezone were wrong inside the rescue_from block.

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

Until next time!

Subscribe to get these updates mailed to you.