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

推荐订阅源

The GitHub Blog
The GitHub Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Microsoft Security Blog
Microsoft Security Blog
J
Java Code Geeks
S
SegmentFault 最新的问题
Apple Machine Learning Research
Apple Machine Learning Research
N
Netflix TechBlog - Medium
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园_首页
宝玉的分享
宝玉的分享
Google DeepMind News
Google DeepMind News
B
Blog RSS Feed
Hugging Face - Blog
Hugging Face - Blog
量子位
Blog — PlanetScale
Blog — PlanetScale
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
阮一峰的网络日志
阮一峰的网络日志
D
Docker
罗磊的独立博客
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
云风的 BLOG
云风的 BLOG
IT之家
IT之家
MyScale Blog
MyScale Blog
Microsoft Azure Blog
Microsoft Azure 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
An Active Record improvement, performance gains and a bug...
David Heinemeier Hansson · 2022-10-21 · via Ruby on Rails: Compress the complexity of modern web apps

Friday, October 21, 2022
Posted by Emmanuel Hayford

Guten Tag! Emmanuel here again, with some updates from Rails.

Don’t trigger after_commit :destroy callback again on destroy if record previously was destroyed The after_commit :destroy callback would always run even if a record was destroyed previously. This PR fixes that. Essentially, we don’t want to call after_commit :destroy on unpersisted records.

Allow ErrorReporter to handle several error classes ErrorReporter now allows you to handle several error classes in one go. You can now handle multiple error classes like so:

Rails.error.handle(ArgumentError, TypeError) do   # Do some work end Fix ciphertext_for for yet-to-be-encrypted values ciphertext_for should return the encrypted value of an attribute that’s encrypted even when the record has not been persisted, before this commit, this wasn’t what we were getting, instead, for an unpersisted record, ciphertext_for returned the plain text value of the attribute. This PR fixes that.

Avoid unnecessary serialize calls after save We’ve got some performance gains with this one: This commit memoizes value_for_database so that serialize is not called a 2nd time after save. Because value is the single source of truth and can change in place, the memoization carefully checks for when value differs from the memoized @value_for_database. Verbatim from the commit message. 😎

Allow ActiveRecord::QueryMethods#reselect to accept a hash This PR allows ActiveRecord::QueryMethods#reselect to receive hash values, similar to this PR that allowed ActiveRecord::QueryMethods#select to accept hashes.

21 contributors improved Rails in the past week. We’ll bring you more updates next week!

Take care.

Subscribe to get these updates mailed to you.