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

推荐订阅源

云风的 BLOG
云风的 BLOG
M
MIT News - Artificial intelligence
博客园 - Franky
J
Java Code Geeks
V
Visual Studio Blog
G
Google Developers Blog
罗磊的独立博客
MongoDB | Blog
MongoDB | Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Recent Announcements
Recent Announcements
Last Week in AI
Last Week in AI
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Stack Overflow Blog
Stack Overflow Blog
博客园 - 司徒正美
The GitHub Blog
The GitHub Blog
腾讯CDC
阮一峰的网络日志
阮一峰的网络日志
V
V2EX
博客园 - 【当耐特】
IT之家
IT之家
I
InfoQ
U
Unit 42
C
Check Point Blog
Martin Fowler
Martin Fowler

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
Capturing error reports in tests and more
David Heinemeier Hansson · 2025-03-28 · via Ruby on Rails: Compress the complexity of modern web apps

Friday, March 28, 2025
Posted by Wojtek

Hi, Wojtek here. Let’s explore last 2 week’s changes in the Rails codebase.

Add capture_error_reports
Captures all reported errors from within the block that match the given error class.

reports = capture_error_reports(IOError) do
  Rails.error.report(IOError.new("What a Terrible Failure"))
  Rails.error.report(StandardError.new)
end
assert_equal 1, reports.size
assert_equal "What a Terrible Failure", reports.first.error.message

Don’t always escape JSON when rendering from controller
The JSON renderer doesn’t escape HTML entities or Unicode line separators anymore. Since the renderer is used to return a JSON document as application/json, it’s typically not necessary to escape those characters, and it improves performance.

You can use the escape: true option or set config.action_controller.escape_json_responses = true to restore the escaping behavior.

Load lazy route sets before inserting test routes
Without loading lazy route sets early, we missed after_routes_loaded callbacks, and risked invoking them with the test routes instead of the real ones if another load was triggered by an engine.

Add RuboCop cache to GHA workflow templates
The aim is to speed up RuboCop checks by sharing the cache between workflow runs, when possible.

Use a self-join for UPDATE with outer joins on PostgreSQL and SQLite
In PostgreSQL and SQLite UPDATE when an OUTER JOIN references the updated table in the ON clause, the join condition cannot be moved to the WHERE clause without breaking the query, so the current implementation is forced to use a subquery. We can support this with a more aggressive manipulation: we duplicate the updated table into the FROM clause with a self-join on the primary key.

Guides update for PostgreSQL timestamp with time zone
Document how to use a configuration option to change the default timestamp data type from timestamp without time zone to timestamp with time zone.

You can view the whole list of changes here. We had 20 contributors to the Rails codebase this past 2 weeks!

Until next time!

Subscribe to get these updates mailed to you.