This Week in Rails: November 6, 2026

Greg · 2026年11月6日

AI 摘要 AI 生成,可能有误

本期《Rails 每周动态》宣布了 Rails 8.0.5.2 和 8.1.4.1 的发布,这是修复了 21 个安全问题的安全更新。本期还重点介绍了框架中忙碌一周的 bug 修复工作,包括对 Active Record 功能的修正,例如合并关系、默认排序、父类属性和关联的继承,以及通过关联进行预加载,此外还包含缓存、URL 生成和消息加密方面的修复。

Hi, it’s Greg, bringing you the latest changes in the Rails codebase. It was a busy week, with a lot of changes, so buckle up!

Rails 8.0.5.2 and 8.1.4.1 have been released! These are security releases, addressing 21 security issues, so you should upgrade if you haven’t already.

Allow anonymous subclasses of cache stores with LocalCache
A recent change built the local cache’s registry key from the store’s class name in initialize, and that name is nil for an anonymous class, so Class.new(ActiveSupport::Cache::MemoryStore).new blew up with a NoMethodError. Anonymous stores are handy in tests to record what a request writes to the cache, and they work again.

继续阅读全文

为了尊重作者,这里只展示开头几段。你可以去原文阅读,或者在 HorizonReader 里读:划线做笔记、让 AI 帮忙。

更多来自 Ruby on Rails Blog

credentials:keys, bulk Action Text, and more!

AI 摘要This week's Rails update introduces a new bin/rails credentials:keys command to list credential keys without exposing secrets, bulk loading of Action Text attachables to eliminate per-attachment queries, and the ability for Action Mailer to boot without Active Job. Other notable changes include NOT ENFORCED check constraint support for PostgreSQL 18+, thread-isolation fixes for ActionController::Live streams, and numerous bug fixes across truncation, Accept header parsing, and SQLite's raised minimum version of 3.37.0. The release closed out with contributions from 48 developers to the Rails codebase.

Securing Rails

AI 摘要This week's Rails codebase changes focus heavily on security, featuring a rewritten 'Securing Rails' guide, a Rack patch blocking arbitrary encodings in multipart form data, hardened generated GitHub Actions workflows, and a new default ensuring association scopes keep owner conditions. Other notable changes include dropping support for the Active Record 6.1 marshal format, supporting Ruby Set objects in class attributes and token lists, decoupling Action Mailer from Active Job, and various performance improvements and bug fixes such as a 100x speedup for String#truncate_words. The week saw 34 contributors, and four new AI model versions were added to the Agents on Rails benchmark.

Hotwire guide and more

AI 摘要This is Wojtek's weekly Rails development update, highlighting a new guide for using Hotwire with Rails along with numerous bug fixes across Active Record, Active Job, Active Support, and other Rails components. Key fixes include deprecating unqualified unscope(where:) calls, filtering sensitive parameters from error logs, preventing silent truncation of 64-bit integers, correcting DST gap time shifts, and no longer exposing encryption keys in inspect output. The week saw contributions from 41 developers to the Rails codebase.

On Rails — Marco Roth: Teaching Rails to Read Its Own Template

AI 摘要Marco Roth, creator of Herb and ReActionView, joins the On Rails podcast to explain how Herb parses HTML and ERB together, allowing broken views to be caught before they reach production, with Herb set to become part of Rails 8.2. The conversation also covers how ReActionView makes Rails views reactive without requiring rewrites, the story behind RubyEvents.org, and why such tooling matters even more when AI agents write templates.

Rails Versions 8.0.5.2 and 8.1.4.1 have been released!

AI 摘要Rails versions 8.0.5.2 and 8.1.4.1 have been released as security updates addressing 21 security issues, including arbitrary file read/write and remote code execution in Active Storage, XSS vulnerabilities in Action View, DoS vulnerabilities, session handling issues, and IP spoofing. The Rails team strongly recommends upgrading as soon as possible, noting that older versions are unsupported and security support for the 8.0 series ends on November 7, 2026. SHA-256 hashes for the released gems are also provided so users can verify the integrity of their downloads.