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

推荐订阅源

云风的 BLOG
云风的 BLOG
GbyAI
GbyAI
G
Google Developers Blog
Engineering at Meta
Engineering at Meta
月光博客
月光博客
腾讯CDC
Recent Announcements
Recent Announcements
酷 壳 – CoolShell
酷 壳 – CoolShell
爱范儿
爱范儿
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
S
SegmentFault 最新的问题
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
阮一峰的网络日志
阮一峰的网络日志
博客园 - 【当耐特】
The GitHub Blog
The GitHub Blog
Last Week in AI
Last Week in AI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
aimingoo的专栏
aimingoo的专栏
Google DeepMind News
Google DeepMind News
Y
Y Combinator Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Martin Fowler
Martin Fowler
A
About on SuperTechFans
博客园 - 叶小钗

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
A new conference, new Action Mailer callbacks and more!
David Heinemeier Hansson · 2023-04-07 · via Ruby on Rails: Compress the complexity of modern web apps

Friday, April 7, 2023
Posted by Greg

Hi, it’s Greg, bringing you the latest news about Ruby on Rails.

We have exciting news from the Rails Foundation! The first-ever Rails World Conference is coming! Join the community on October 5 & 6 in Amsterdam, Netherlands, for keynotes, technical sessions, and all things Rails. A website with tickets and a CFP is coming soon! You can read the announcement here.

Reset composite primary key in #dup
This pull request ensures that the composite primary key is reset when #dup is called on an instance of an ActiveRecord::Base subclass.

For example:

class TravelRoute < ActiveRecord::Base
  self.primary_key = [:origin, :destination]
end

route = TravelRoute.new(origin: "NYC", destination: "LAX")
route.dup # => #<TravelRoute origin: nil, destination: nil>

Ensure pre-7.1 migrations use legacy index names when using create_table
A follow-up to 47753 ensures the older versions of Active Record will use the legacy index names rather than the new truncated ones.

Correctly dump check constraints for MySQL 8.0.16+
If you’re using MySQL 8.0.16+ and your database contains a table with a check constraint, the first and last characters of the constraint will be stripped when dumping the schema. This makes it impossible to use check constraints in a MySQL 8.0 database with the :ruby schema format, because once they are dumped, they cannot be re-imported. The change in this pull request fixed the issue.

Only default to select primary key when non-composite
Historically, when a relation is handled in the predicate builder has no selected values, it falls back to selecting the model’s primary key. This tends to work well in single-column primary key cases. In composite key cases, this can lead to attempting to compare a single attribute to a list of attributes, which builds malformed SQL. The check this pull request added prevents any code from attempting to do so, by raising in composite primary key cases when defaulting to primary key. For now, users can build these queries themselves.

Add *_deliver callbacks for Action Mailer
This pull request adds deliver callbacks (e.g. before_deliver, after_deliver, around_deliver) to Action Mailer. The benefit is that it allows delivery observer/interceptor-like behaviors within the context of the instance of ActionMailer::Base rather than operating only on the Mail object.

Active Job verbose logging
A verbose_enqueue_logs configuration option is added to Active Job to display the caller of background job enqueue in the log to help with debugging. It is enabled in development only for new and upgraded applications. Not recommended for use in the production environment since it relies on Ruby’s Kernel#caller which is fairly slow.

There were a lot of documentation-related changes I didn’t cover, you can view the whole list of changes here.
We had 21 contributors to the Rails codebase this past week!

Until next time!

Subscribe to get these updates mailed to you.