credentials:keys, bulk Action Text, and more!

Emmanuel Hayford · 2026年11月27日

AI 摘要 AI 生成,可能有误

本周的 Rails 更新引入了新的 bin/rails credentials:keys 命令,可在不暴露机密信息的情况下列出凭证密钥;新增了 Action Text 附件(attachables)的批量加载功能,以消除逐个附件的查询;同时,Action Mailer 现在无需 Active Job 即可启动。其他值得注意的变更包括:对 PostgreSQL 18 及以上版本 NOT ENFORCED 检查约束的支持、针对 ActionController::Live 流的线程隔离修复,以及大量错误修复,涵盖截断(truncation)处理、Accept 头解析,以及 SQLite 最低版本要求提升至 3.37.0。本次发布最终共有 48 位开发者向 Rails 代码库提交了贡献。

You can now list credential keys without printing their values, Action Text stops querying once per attachment, and Action Mailer boots without Active Job. Here’s what’s new in Rails:

Add bin/rails credentials:keys
Lists every key in the credentials file without the secrets. Paths use the same dot notation as credentials:fetch, so you can check what is set in production without revealing anything.

Check the encrypted file key length when decrypting
A key of the wrong length used to raise only on write. Reading now raises ActiveSupport::EncryptedFile::InvalidKeyLengthError too. The credentials and encrypted commands print that error and exit 1, and edit fails before opening the editor.

继续阅读全文

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

更多来自 Ruby on Rails Blog

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.

This Week in Rails: November 6, 2026

AI 摘要This edition of 'This Week in Rails' announces the release of Rails 8.0.5.2 and 8.1.4.1, security updates addressing 21 security issues. The issue also highlights a busy week of bug fixes across the framework, including corrections to Active Record features like merging relations, default ordering, inheritance of parent-class attributes and associations, and preloading through associations, as well as fixes in caching, URL generation, and message encryption.

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.