<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://rubyonrails.org/feed.xml" rel="self" type="application/atom+xml" /><link href="https://rubyonrails.org/" rel="alternate" type="text/html" /><updated>2026-11-13T20:37:35+00:00</updated><id>https://rubyonrails.org/feed.xml</id><title type="html">Ruby on Rails: Accelerate your agents with convention over configuration</title><subtitle>A full-stack web application framework written in Ruby, following the Model View Controller pattern, that includes everything you need to build modern database-backed web apps.</subtitle><entry><title type="html">On Rails — Marco Roth: Teaching Rails to Read Its Own Template</title><link href="https://rubyonrails.org/2026/11/13/on-rails-marco-roth-herb-reaction-view" rel="alternate" type="text/html" title="On Rails — Marco Roth: Teaching Rails to Read Its Own Template" /><published>2026-11-13T00:00:00+00:00</published><updated>2026-11-13T00:00:00+00:00</updated><id>https://rubyonrails.org/2026/11/13/on-rails-marco-roth-herb-reaction-view</id><content type="html" xml:base="https://rubyonrails.org/2026/11/13/on-rails-marco-roth-herb-reaction-view"><![CDATA[<p><a href="https://marcoroth.dev">Marco Roth</a>, independent consultant and the creator of <a href="https://herb-tools.dev">Herb</a> and <a href="https://reactionview.dev">ReActionView</a>, joins Robby to talk about teaching Rails to understand its own templates.

<p>Marco explains how Herb parses HTML and ERB together, why that lets it catch broken views long before they reach production, and how it is set to become part of Rails 8.2. They also get into how ReActionView makes Rails views reactive without rewriting them, the story behind <a href="https://rubyevents.org">RubyEvents.org</a>, and why tooling like Herb matters even more when AI agents are writing your templates.</p>

<p><a href="https://podcast.rubyonrails.org/2462975/episodes/20121188-marco-roth-teaching-rails-to-read-its-own-template">Listen to this episode</a> (90m) or <a href="https://podcast.rubyonrails.org">subscribe to On Rails</a> in your podcast player.</p>
</p>]]></content><author><name>Rails Foundation</name></author><category term="podcast" /><summary type="html"><![CDATA[Marco Roth, independent consultant and the creator of Herb and ReActionView, joins Robby to talk about teaching Rails to understand its own templates.]]></summary></entry><entry><title type="html">Hotwire guide and more</title><link href="https://rubyonrails.org/2026/11/13/this-week-in-rails" rel="alternate" type="text/html" title="Hotwire guide and more" /><published>2026-11-13T00:00:00+00:00</published><updated>2026-11-13T00:00:00+00:00</updated><id>https://rubyonrails.org/2026/11/13/this-week-in-rails</id><content type="html" xml:base="https://rubyonrails.org/2026/11/13/this-week-in-rails"><![CDATA[<p>Hi, <a href="https://x.com/morgoth85">Wojtek</a> here. Let’s explore this week’s changes with another big round of fixes in the Rails codebase.</p>

<p><a href="https://github.com/rails/rails/pull/59753">Add a guide for using Hotwire with Rails</a><br />
The guide can already be read on the <a href="https://edgeguides.rubyonrails.org/using_hotwire_with_rails.html">Edge Guides</a>.</p>

<p><a href="https://github.com/rails/rails/pull/59141">Use an Array for storing Active Record attributes</a><br />
Cast and freeze a model’s attribute defaults when its schema is loaded.</p>

<p><a href="https://github.com/rails/rails/pull/59767">Deprecate unscope(where: :column) removing conditions on other tables</a><br />
An unqualified column passed to <code class="language-plaintext highlighter-rouge">unscope(where: ...)</code> currently removes conditions on every table that has a column of that name, including joined and eager loaded tables. In Rails 9.0 it will only remove conditions on the relation’s own table.</p>

<p><a href="https://github.com/rails/rails/pull/59779">Detect Kamal in app:update command</a><br />
The update command didn’t pass <code class="language-plaintext highlighter-rouge">skip_kamal</code>, so it rendered config files as if every application deployed with Kamal.</p>

<p><a href="https://github.com/rails/rails/pull/59527">Filter parameters from the message logged when a command can’t be handled</a><br />
When a channel action raised, the error log included the raw WebSocket message, so values hidden by <em>filter_parameters</em> in the action’s debug log were written in clear at the error level.</p>

<p><a href="https://github.com/rails/rails/pull/59719">Cast numeric values to the scale of the PostgreSQL money type</a><br />
<em>money</em> only rounded strings to its scale, so a numeric value was held unrounded and as given, while it was rounded on save and read back as a <em>BigDecimal</em>.</p>

<p><a href="https://github.com/rails/rails/pull/59709">Qualify unscope values with table name when merging relations</a><br />
Fixes an issue where merging a relation with an <code class="language-plaintext highlighter-rouge">unscope(where: ...)</code> clause unscoped conditions on joined or eager loaded tables that share the same column name.</p>

<p><a href="https://github.com/rails/rails/pull/59688">Force UTF8 encoding when reading source annotation</a><br />
Notes extracted from files such as ERB, YAML, JS or CSS are now UTF-8 like the ones extracted from Ruby files, with invalid bytes replaced.</p>

<p><a href="https://github.com/rails/rails/pull/59475">Shift local times in a DST gap forward by the gap’s length</a><br />
<em>TimeZone#local</em>, <em>TimeZone#parse</em>, and <em>TimeWithZone#change</em> assumed every gap was one hour long, which overshot in zones with a shorter gap and collapsed distinct local times onto the same instant in zones with a longer one.</p>

<p><a href="https://github.com/rails/rails/pull/50312">Implement button_to in terms of form_tag</a><br />
Forms rendered by <em>button_to</em> include <em>[accept-charset=”UTF-8”]</em> and render their hidden fields before the button, rather than after it.</p>

<p><a href="https://github.com/rails/rails/pull/59702">Fix :integer attributes silently truncating 64-bit integer strings</a><br />
Strings cast by <em>ActiveModel::Type::Integer</em> are cut to <em>limit * 4</em> bytes. Types without a limit, such as Active Model attributes, used the default limit of 4, so a 19-digit value like <em>“9223372036854775807”</em> was silently truncated to 16 digits. Types without a limit now use a 32-byte window, which fits any 64-bit value. Types with an explicit limit are unchanged.</p>

<p><a href="https://github.com/rails/rails/pull/59642">Group bound SQL literals in where clause like other SQL literals</a><br />
Fixes <em>where</em> and <em>having</em> not parenthesizing bound SQL literals passed as Arel nodes.</p>

<p><a href="https://github.com/rails/rails/pull/59601">Don’t convert the given scheduled_at to UTC in place</a><br />
Fixes <em>ActiveJob::Core#serialize</em> converting the given <em>scheduled_at</em> to UTC in place.</p>

<p><a href="https://github.com/rails/rails/pull/59754">Don’t show the encryption key in ActiveSupport::EncryptedFile#inspect</a><br />
Previously the key, read from the key file or environment variable, was included in the default <em>inspect</em> output, so it could end up in logs or error pages.</p>

<p><a href="https://github.com/rails/rails/pull/59593">Fix preloading has_many :through with conditions ignoring preload and eager_load in the scope</a><br />
Only <em>includes</em> in the scope was applied, so the nested association was loaded with a query per record, or raised under <em>strict_loading</em>.</p>

<p><a href="https://github.com/rails/rails/pull/59591">Fix a default_order being ignored by a disable_joins through association</a><br />
An explicit order in an association’s scope was carried over to the queries the chain is split into, but a <em>default_order</em> was dropped, so the records came back in whatever order the database returned them.</p>

<p><a href="https://github.com/rails/rails/pull/59528">Fix nested preloads under a through association using copies of its records</a><br />
When the owners already had the through association loaded, the nested association was preloaded on fresh copies of its records, so it raised with <em>strict_loading</em>, and without it was loaded again lazily, one query per record. Nested preloads now always use the records held by the owners.</p>

<p><a href="https://github.com/rails/rails/pull/59501">Fix FrozenError in frozen MessageVerifier, MessageEncryptor and CachingKeyGenerator</a><br />
A <em>MessageVerifier</em> with an unknown digest now raises when it is frozen, instead of when it first signs or verifies a message</p>

<p><em>You can view the whole list of changes <a href="https://github.com/rails/rails/compare/@%7B2026-11-06%7D...main@%7B2026-11-13%7D">here</a>.</em><br />
<em>We had <a href="https://contributors.rubyonrails.org/contributors/in-time-window/20261106-20261113">41 contributors</a> to the Rails codebase this past week!</em></p>

<p>Until next time!</p>

<p><em><a href="https://world.hey.com/this.week.in.rails">Subscribe</a> to get these updates mailed to you.</em></p>]]></content><author><name>Wojtek</name></author><category term="news" /><summary type="html"><![CDATA[Hi, Wojtek here. Let’s explore this week’s changes with another big round of fixes in the Rails codebase.]]></summary></entry><entry><title type="html">This Week in Rails: November 6, 2026</title><link href="https://rubyonrails.org/2026/11/6/this-week-in-rails" rel="alternate" type="text/html" title="This Week in Rails: November 6, 2026" /><published>2026-11-06T00:00:00+00:00</published><updated>2026-11-06T00:00:00+00:00</updated><id>https://rubyonrails.org/2026/11/6/this-week-in-rails</id><content type="html" xml:base="https://rubyonrails.org/2026/11/6/this-week-in-rails"><![CDATA[<p>Hi, it’s <a href="https://greg.molnar.io">Greg</a>, bringing you the latest changes in the Rails codebase. It was a busy week, with a lot of changes, so buckle up!</p>

<p><a href="https://rubyonrails.org/2026/11/4/Rails-8.0.5.2-and-8.1.4.1-have-been-released">Rails 8.0.5.2 and 8.1.4.1 have been released!</a>
These are security releases, addressing 21 security issues, so you should upgrade if you haven’t already.</p>

<p><a href="https://github.com/rails/rails/pull/59640">Allow anonymous subclasses of cache stores with LocalCache</a><br />
A recent change built the local cache’s registry key from the store’s class name in <code class="language-plaintext highlighter-rouge">initialize</code>, and that name is <code class="language-plaintext highlighter-rouge">nil</code> for an anonymous class, so <code class="language-plaintext highlighter-rouge">Class.new(ActiveSupport::Cache::MemoryStore).new</code> blew up with a <code class="language-plaintext highlighter-rouge">NoMethodError</code>. Anonymous stores are handy in tests to record what a request writes to the cache, and they work again.</p>

<p><a href="https://github.com/rails/rails/pull/59638">Fix Active Record <em>includes</em> with <em>merge</em> of an order on another model</a><br />
Merging a relation that orders by another model’s table lost the reference to that table, so <code class="language-plaintext highlighter-rouge">includes</code> didn’t know it had to join it. The merge now records the references for the order values it copies over.</p>

<p><a href="https://github.com/rails/rails/pull/59634">Accept bind values in <em>where!</em> and <em>having!</em> again</a><br />
<code class="language-plaintext highlighter-rouge">where!</code> and <code class="language-plaintext highlighter-rouge">having!</code> are <code class="language-plaintext highlighter-rouge">:nodoc:</code>, but plenty of apps and gems call them with bind values, Discourse and Canvas among them. A recent refactor made <code class="language-plaintext highlighter-rouge">where!("id = ?", 1)</code> raise a <code class="language-plaintext highlighter-rouge">NoMethodError</code>, and this brings the old signature back.</p>

<p><a href="https://github.com/rails/rails/pull/59626">Skip nested values that serialize to an empty query in to_query</a><br />
<code class="language-plaintext highlighter-rouge">{ q: [[]], page: 2 }.to_query</code> returned <code class="language-plaintext highlighter-rouge">"&amp;page=2"</code> with a stray separator in front, and since <code class="language-plaintext highlighter-rouge">url_for</code> passes extra options through, you ended up with URLs like <code class="language-plaintext highlighter-rouge">/search?&amp;page=2</code>. Values that serialize to an empty query string are skipped now, in both <code class="language-plaintext highlighter-rouge">Hash#to_query</code> and <code class="language-plaintext highlighter-rouge">Array#to_query</code>, while <code class="language-plaintext highlighter-rouge">nil</code>, <code class="language-plaintext highlighter-rouge">false</code> and empty strings are still kept.</p>

<p><a href="https://github.com/rails/rails/pull/59625">Generate URLs for empty arguments with default URL options as before</a><br />
Since the optimized URL helpers started kicking in with default URL options, <code class="language-plaintext highlighter-rouge">post_url(post)</code> raised an <code class="language-plaintext highlighter-rouge">UrlGenerationError</code> when the record’s <code class="language-plaintext highlighter-rouge">to_param</code> was empty, where it used to generate a URL. In a mailer, where <code class="language-plaintext highlighter-rouge">default_url_options[:host]</code> is set, that means an exception instead of <code class="language-plaintext highlighter-rouge">http://example.com/posts/</code>. The helpers now fall back to the general path when the optimized one can’t build the path.</p>

<p><a href="https://github.com/rails/rails/pull/59602">Show the template’s line for syntax errors compiled through Herb</a><br />
When a template has a syntax error and Herb compiles it, the error didn’t name the template, so the error page couldn’t highlight the line you care about. The handler passes the template identifier along now, and nothing is re-parsed to get it.</p>

<p><a href="https://github.com/rails/rails/pull/59586">Fix <em>in_order_of</em> modifying the receiver relation</a><br />
<code class="language-plaintext highlighter-rouge">in_order_of</code> added the referenced table to the relation you called it on instead of the one it returns, so using it on an already loaded relation raised <code class="language-plaintext highlighter-rouge">ActiveRecord::UnmodifiableRelation</code>.</p>

<p><a href="https://github.com/rails/rails/pull/59580">Fix <em>merge</em> dropping <em>RECURSIVE</em> from a relation built with <em>with_recursive</em></a><br />
The recursive flag lived in an instance variable rather than with the relation’s other values, and <code class="language-plaintext highlighter-rouge">Relation::Merger</code> only merges values, so merging a <code class="language-plaintext highlighter-rouge">with_recursive</code> relation gave you a plain <code class="language-plaintext highlighter-rouge">WITH</code>. It is a proper value now, which also means <code class="language-plaintext highlighter-rouge">except(:with)</code> and <code class="language-plaintext highlighter-rouge">unscope(:with)</code> remove it along with the CTEs.</p>

<p><a href="https://github.com/rails/rails/pull/59575">Use <em>count(:all)</em> for <em>one?</em> and <em>many?</em></a><br />
<code class="language-plaintext highlighter-rouge">one?</code> and <code class="language-plaintext highlighter-rouge">many?</code> counted the select list, so with multiple select values or an aggregate select they built an invalid <code class="language-plaintext highlighter-rouge">COUNT(...)</code> and raised <code class="language-plaintext highlighter-rouge">ActiveRecord::StatementInvalid</code>. They only need to know how many records the relation loads, so they count <code class="language-plaintext highlighter-rouge">:all</code> now. <code class="language-plaintext highlighter-rouge">distinct</code> relations are still counted through a subquery.</p>

<p><a href="https://github.com/rails/rails/pull/59559">Fix <em>one?</em> and <em>many?</em> on grouped relations</a><br />
A grouped count returns a hash, so <code class="language-plaintext highlighter-rouge">one?</code> was always <code class="language-plaintext highlighter-rouge">false</code> on a grouped relation and <code class="language-plaintext highlighter-rouge">many?</code> raised a <code class="language-plaintext highlighter-rouge">TypeError</code>. Both count the groups now, which is what you would expect them to do.</p>

<p><a href="https://github.com/rails/rails/pull/59573">Keep the local cache consistent with batched writes and deletes</a><br />
<code class="language-plaintext highlighter-rouge">LocalCache</code> kept its entries in sync by hooking the single-key primitives, and <code class="language-plaintext highlighter-rouge">MemCacheStore</code>’s Dalli batch paths go around those, so a key deleted with <code class="language-plaintext highlighter-rouge">delete_multi</code> was still readable inside <code class="language-plaintext highlighter-rouge">with_local_cache</code>. The multi variants are hooked in <code class="language-plaintext highlighter-rouge">LocalCache</code> itself now, so the local cache stays consistent whatever a store does in its batch implementation.</p>

<p><a href="https://github.com/rails/rails/pull/59566">Fix stale reads from the local cache after <em>ActiveSupport::Cache::MemCacheStore#write_multi</em></a><br />
On the <code class="language-plaintext highlighter-rouge">set_multi</code> path the local cache kept the old values, so a <code class="language-plaintext highlighter-rouge">read</code> right after a <code class="language-plaintext highlighter-rouge">write_multi</code> handed you stale data. The written keys are dropped from the local cache before the call, so the next read goes to memcached. They aren’t filled in directly because <code class="language-plaintext highlighter-rouge">set_multi</code> doesn’t report which keys were actually stored.</p>

<p><a href="https://github.com/rails/rails/pull/59555">Index what <em>each</em> yields in Enumerable#index_with again</a><br />
<code class="language-plaintext highlighter-rouge">index_with</code> was switched to <code class="language-plaintext highlighter-rouge">to_h</code> to presize the result, but <code class="language-plaintext highlighter-rouge">to_h</code> is not <code class="language-plaintext highlighter-rouge">each</code> for every enumerable. <code class="language-plaintext highlighter-rouge">Hash#to_h</code> yields the key and the value as two arguments, so <code class="language-plaintext highlighter-rouge">{a: 1}.index_with { |k, v| ... }</code> indexed <code class="language-plaintext highlighter-rouge">:a</code> with <code class="language-plaintext highlighter-rouge">v</code> as <code class="language-plaintext highlighter-rouge">nil</code> where 8.1 indexed <code class="language-plaintext highlighter-rouge">[:a, 1]</code>, and <code class="language-plaintext highlighter-rouge">Struct#to_h</code> yielded member names instead of values. <code class="language-plaintext highlighter-rouge">Enumerable#index_with</code> is back on <code class="language-plaintext highlighter-rouge">each</code>, and a new <code class="language-plaintext highlighter-rouge">Array#index_with</code> keeps the faster <code class="language-plaintext highlighter-rouge">to_h</code>.</p>

<p><a href="https://github.com/rails/rails/pull/59531">Fix -n ClassName#test_name filter in the test runner</a><br />
<code class="language-plaintext highlighter-rouge">bin/rails test -n ClassName#test_name</code> ran no tests at all, broken since Rails 7.1, because the runner added a <code class="language-plaintext highlighter-rouge">test_</code> prefix to a filter that already had one. It also made isolated tests fail on platforms without <code class="language-plaintext highlighter-rouge">fork</code>, like JRuby and Windows. Declarative names with a <code class="language-plaintext highlighter-rouge">#</code> in them, like <code class="language-plaintext highlighter-rouge">test "issue #123"</code>, still get the prefix.</p>

<p><a href="https://github.com/rails/rails/pull/59524">Let a frozen CachingKeyGenerator work on Ruby 3.3</a><br />
The key cache goes through <code class="language-plaintext highlighter-rouge">ActiveSupport::Ractors.[]</code> now, which falls back to <code class="language-plaintext highlighter-rouge">Ractor.current[]</code> on Ruby 3.3, so a frozen <code class="language-plaintext highlighter-rouge">CachingKeyGenerator</code> still returns its cached keys there.</p>

<p><a href="https://github.com/rails/rails/pull/59523">Fix in_batches with use_ranges keeping an ignored default_order</a><br />
Batching ignores <code class="language-plaintext highlighter-rouge">default_order</code> the same way it ignores an explicit order, but the relations yielded by <code class="language-plaintext highlighter-rouge">in_batches(use_ranges: true)</code> still carried it, so every batch query had a pointless <code class="language-plaintext highlighter-rouge">ORDER BY</code>.</p>

<p><a href="https://github.com/rails/rails/pull/59516">Allow <em>ActiveRecord::Relation#unscope(:default_order)</em> to remove default ordering while keeping explicit ordering</a><br />
<code class="language-plaintext highlighter-rouge">unscope(:default_order)</code> used to raise an <code class="language-plaintext highlighter-rouge">ArgumentError</code>. It now removes the default ordering and leaves your explicit <code class="language-plaintext highlighter-rouge">order</code> alone, the mirror image of what <code class="language-plaintext highlighter-rouge">unscope(:order)</code> does:</p>

<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="no">Post</span><span class="p">.</span><span class="nf">order</span><span class="p">(</span><span class="ss">:id</span><span class="p">).</span><span class="nf">default_order</span><span class="p">(</span><span class="ss">:title</span><span class="p">).</span><span class="nf">unscope</span><span class="p">(</span><span class="ss">:default_order</span><span class="p">)</span>
<span class="c1"># SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC</span>
</code></pre></div></div>

<p><a href="https://github.com/rails/rails/pull/59511">Percent-encode href in preload Link header entries</a><br />
A URL with a <code class="language-plaintext highlighter-rouge">&gt;</code> in it closed the URI reference early in the <code class="language-plaintext highlighter-rouge">Link</code> header, so the rest of the URL was parsed as extra link parameters, or even extra links. <code class="language-plaintext highlighter-rouge">&lt;</code>, <code class="language-plaintext highlighter-rouge">&gt;</code>, whitespace and control characters are percent-encoded now, while <code class="language-plaintext highlighter-rouge">,</code> and <code class="language-plaintext highlighter-rouge">;</code> are left alone because they are common in CDN URLs. The HTML tag is unchanged.</p>

<p><a href="https://github.com/rails/rails/pull/59508">Exclude <em>default_order</em> from collection cache version query</a><br />
<code class="language-plaintext highlighter-rouge">cache_key</code> on a relation with a <code class="language-plaintext highlighter-rouge">default_order</code> built its <code class="language-plaintext highlighter-rouge">COUNT(*), MAX(updated_at)</code> query with the ordering still in place, and PostgreSQL rejects that with a <code class="language-plaintext highlighter-rouge">GroupingError</code>. The default order is stripped there too now, as it already was for an explicit order.</p>

<p><a href="https://github.com/rails/rails/pull/59502">Pass enums added to a parent down to existing subclasses</a><br />
Add an <code class="language-plaintext highlighter-rouge">enum</code> to a parent class after a subclass is already defined and the subclass’s <code class="language-plaintext highlighter-rouge">defined_enums</code> didn’t include it.</p>

<p><a href="https://github.com/rails/rails/pull/59501">Fix FrozenError in frozen MessageVerifier, MessageEncryptor and CachingKeyGenerator</a><br />
Freezing a <code class="language-plaintext highlighter-rouge">MessageVerifier</code> or <code class="language-plaintext highlighter-rouge">MessageEncryptor</code> before it had verified or decrypted anything, which is exactly what <code class="language-plaintext highlighter-rouge">Ractor.make_shareable</code> does, raised a <code class="language-plaintext highlighter-rouge">FrozenError</code> on first use. Note that a verifier with an unknown digest now raises when you freeze it, rather than when it first signs or verifies a message.</p>

<p><a href="https://github.com/rails/rails/pull/59497">Fix preloading has_many :through with a default_order scope</a><br />
The through preloader looked at explicit <code class="language-plaintext highlighter-rouge">order_values</code> in three places and ignored <code class="language-plaintext highlighter-rouge">default_order_values</code>, so a default order anywhere in the chain was dropped when preloading. All three follow the lazy query now: an explicit order still wins, and an empty one like <code class="language-plaintext highlighter-rouge">reorder(nil)</code> falls back to the default.</p>

<p><a href="https://github.com/rails/rails/pull/59496">Fix eager loading with limit and default_order</a><br />
Eager loading with <code class="language-plaintext highlighter-rouge">limit</code> or <code class="language-plaintext highlighter-rouge">offset</code> runs a <code class="language-plaintext highlighter-rouge">SELECT DISTINCT</code> of primary keys first, and that query ignored <code class="language-plaintext highlighter-rouge">default_order</code>, so the <code class="language-plaintext highlighter-rouge">ORDER BY</code> columns were missing from its select list. PostgreSQL and MySQL both refuse that, so the query raised instead of returning your records.</p>

<p><a href="https://github.com/rails/rails/pull/59495">Keep the scale of non-:decimal types in numericality validation</a><br />
The numericality validator only kept the type’s scale for <code class="language-plaintext highlighter-rouge">:decimal</code> columns, so a <code class="language-plaintext highlighter-rouge">money</code> column lost its scale and the wrong value was validated. It keeps the type whenever it has a scale now and rounds the cast value to it, which also covers attributes wrapped by <code class="language-plaintext highlighter-rouge">normalizes</code>.</p>

<p><a href="https://github.com/rails/rails/pull/59494">Raise on assigning <em>attr_readonly</em> attributes on subclasses with generated writers</a><br />
<code class="language-plaintext highlighter-rouge">attr_readonly</code> only undefined the attribute methods of the class it was called on, so a subclass whose writers were already generated kept them. Assigning such an attribute on the subclass didn’t raise <code class="language-plaintext highlighter-rouge">ActiveRecord::ReadonlyAttributeError</code>, the value was just silently not saved.</p>

<p><a href="https://github.com/rails/rails/pull/59492">Pass readonly attributes added to a parent down to existing subclasses</a><br />
A subclass that had declared readonly attributes of its own kept its own copy of the list, so attributes marked readonly on the parent afterwards could still be changed and saved through the subclass.</p>

<p><a href="https://github.com/rails/rails/pull/59491">Pass attribute aliases added to a parent down to existing subclasses</a><br />
The same problem with <code class="language-plaintext highlighter-rouge">alias_attribute</code>: a subclass holding its own copy of the aliases didn’t see aliases added to the parent later, <code class="language-plaintext highlighter-rouge">attribute_alias?</code> returned <code class="language-plaintext highlighter-rouge">false</code> and queries like <code class="language-plaintext highlighter-rouge">where</code> used the alias as a column name.</p>

<p><a href="https://github.com/rails/rails/pull/59490">Pass aggregations added to a parent down to existing subclasses</a><br />
And the same with <code class="language-plaintext highlighter-rouge">composed_of</code>: <code class="language-plaintext highlighter-rouge">reflect_on_aggregation</code> returned <code class="language-plaintext highlighter-rouge">nil</code> on the subclass, so <code class="language-plaintext highlighter-rouge">where</code> couldn’t expand the value object.</p>

<p><a href="https://github.com/rails/rails/pull/59488">Fix preloading has_one through associations sharing a table</a><br />
When the through and source models live in the same table, STI subclasses for example, the source conditions, including the STI type condition, were merged into the through model’s query, where they filtered the through records instead of the source records. They are applied by the source preloader now.</p>

<p><a href="https://github.com/rails/rails/pull/59486">Honor unless_exist and avoid double compression in MemCacheStore#write_multi</a><br />
<code class="language-plaintext highlighter-rouge">write_multi</code> ignored <code class="language-plaintext highlighter-rouge">unless_exist: true</code> and happily overwrote existing values, and it compressed entries twice, once itself and once through Dalli. It falls back to per-entry writes for <code class="language-plaintext highlighter-rouge">unless_exist</code> now, and drops <code class="language-plaintext highlighter-rouge">:compress</code> before handing the batch over.</p>

<p><a href="https://github.com/rails/rails/pull/59485">Add support for comma-separated values in <em>ENV[“RAILS_MASTER_KEY”]</em></a><br />
You can pass several master keys in <code class="language-plaintext highlighter-rouge">RAILS_MASTER_KEY</code> separated by commas, and Rails tries each one until it finds the one that works. Handy for rotating the key without a window where nothing can decrypt your credentials.</p>

<p><a href="https://github.com/rails/rails/pull/59473">Fix preloading ordered has_many :through reusing loaded source records</a><br />
If you preload two through associations that share a source, one ordered and one not, the ordered one reused the records the unordered one had already loaded and came back in the wrong order.</p>

<p><a href="https://github.com/rails/rails/pull/59470">Don’t add a trailing slash after a required format in optimized URL helpers</a><br />
With <code class="language-plaintext highlighter-rouge">trailing_slash</code> and a route where the format is a required part, the optimized helper added a slash after the format, so the URL didn’t match what the general path generates.</p>

<p><a href="https://github.com/rails/rails/pull/59462">Pass associations added to a parent down to existing subclasses</a><br />
This is the one that started the series above. A subclass that defined an association of its own kept a copy of the parent’s reflections, so an association added to the parent afterwards, by an engine or a concern loaded later, had its methods defined on the subclass but raised <code class="language-plaintext highlighter-rouge">ActiveRecord::AssociationNotFoundError</code> when you called them.</p>

<p><a href="https://github.com/rails/rails/pull/59461">Expose the untouched association name to restrict_with_error messages</a><br />
The <code class="language-plaintext highlighter-rouge">restrict_dependent_destroy</code> message interpolates <code class="language-plaintext highlighter-rouge">%{record}</code>, which is always downcased. That reads well in English, but German ends up with “abhängige firmen”, so the name is now also available untouched as <code class="language-plaintext highlighter-rouge">%{association_name}</code>. Existing translations keep working.</p>

<p><a href="https://github.com/rails/rails/pull/59449">Validate reflections before precomputing in <em>freeze</em></a><br />
Freezing a reflection precomputes its memoized values and only ran <code class="language-plaintext highlighter-rouge">check_validity!</code> afterwards, so a misconfigured association, a through with a missing source association for example, raised a <code class="language-plaintext highlighter-rouge">NoMethodError</code> instead of the error that tells you what is actually wrong.</p>

<p><a href="https://github.com/rails/rails/pull/59448">Fix preloading <em>source_type</em> through with conditions on the through table</a><br />
A <code class="language-plaintext highlighter-rouge">has_many :through</code> with <code class="language-plaintext highlighter-rouge">source_type</code> and conditions on the through table loaded fine lazily or with <code class="language-plaintext highlighter-rouge">eager_load</code>, but preloading it raised <code class="language-plaintext highlighter-rouge">ActiveRecord::StatementInvalid</code>, because the source query never joined the through table.</p>

<p><a href="https://github.com/rails/rails/pull/59446">Fix preloading <em>source_type</em> / <em>disable_joins</em> through with conditions</a><br />
With <code class="language-plaintext highlighter-rouge">source_type</code> or <code class="language-plaintext highlighter-rouge">disable_joins</code>, the conditions of a through association are applied by the source query, and source records already loaded on the through records were reused without those conditions. So a scoped association could come back holding records it was supposed to filter out.</p>

<p><a href="https://github.com/rails/rails/pull/59444">Fix preloading scoped <em>has_many :through</em> reusing loaded through records</a><br />
Preloading a scoped and an unscoped through association together let the scoped one reuse the unscoped one’s through records, so an <code class="language-plaintext highlighter-rouge">inactive_tags</code> association happily included active tags.</p>

<p><a href="https://github.com/rails/rails/pull/59443">Fix preloading <em>source_type</em> through associations with loaded through records</a><br />
When the through association was already loaded, the source records were preloaded for every through record, including the ones whose polymorphic type doesn’t match <code class="language-plaintext highlighter-rouge">source_type</code>, which could raise a <code class="language-plaintext highlighter-rouge">NameError</code> for an unknown type. A Symbol <code class="language-plaintext highlighter-rouge">source_type</code> never matched the stored type either, so the association was preloaded as empty.</p>

<p><a href="https://github.com/rails/rails/pull/59436">Exclude default_order from aggregate calculations</a><br />
Same story for the calculations: <code class="language-plaintext highlighter-rouge">count</code>, <code class="language-plaintext highlighter-rouge">sum</code> and friends drop an explicit order already, and now they drop <code class="language-plaintext highlighter-rouge">default_order</code> as well. That fixes invalid SQL on PostgreSQL, including <code class="language-plaintext highlighter-rouge">distinct.count</code> with a custom select.</p>

<p><a href="https://github.com/rails/rails/pull/59435">Fix counter cache double increment with partial inserts disabled</a><br />
With <code class="language-plaintext highlighter-rouge">partial_inserts</code> disabled, creating a record through a <code class="language-plaintext highlighter-rouge">has_many :through</code> incremented the counter cache twice: once by the owner’s <code class="language-plaintext highlighter-rouge">INSERT</code>, which wrote the in-memory value, and then again by the join model’s <code class="language-plaintext highlighter-rouge">belongs_to</code>. Unchanged counter cache columns are left out of the <code class="language-plaintext highlighter-rouge">INSERT</code> now, as they already are with partial inserts enabled.</p>

<p><a href="https://github.com/rails/rails/pull/59418">Accept Symbol values for the routing format: option</a><br />
<code class="language-plaintext highlighter-rouge">format: :json</code> now sets the same requirement and default as <code class="language-plaintext highlighter-rouge">format: "json"</code>, including in <code class="language-plaintext highlighter-rouge">scope</code> and <code class="language-plaintext highlighter-rouge">resources</code>.</p>

<p><a href="https://github.com/rails/rails/pull/59411">Retry <em>ActiveRecord::SerializationFailure</em> errors on safely-retryable queries</a><br />
A serialization failure rolls back whatever the statement was part of, so a query that wasn’t inside an open transaction can simply be retried on the same connection, exactly like <code class="language-plaintext highlighter-rouge">ActiveRecord::Deadlocked</code> already is.</p>

<p><a href="https://github.com/rails/rails/pull/59408">Don’t require Capybara and Selenium on boot in new apps</a><br />
The generated <code class="language-plaintext highlighter-rouge">Gemfile</code> declares <code class="language-plaintext highlighter-rouge">capybara</code> and <code class="language-plaintext highlighter-rouge">selenium-webdriver</code> with <code class="language-plaintext highlighter-rouge">require: false</code>, like it already does for bootsnap and friends, so <code class="language-plaintext highlighter-rouge">Bundler.require</code> stops loading them into test processes that never run a system test. Rails requires both where they are used. If you reach for Capybara outside of system tests, <code class="language-plaintext highlighter-rouge">Capybara.string</code> in a view test for example, you need to require it yourself now.</p>

<p><a href="https://github.com/rails/rails/pull/59383">ActiveStorage: Fix JSON::ParserError from ffprobe duplicate keys</a><br />
ffprobe can report duplicate keys in its JSON output, and newer versions of the json gem reject those, so analyzing a video raised a <code class="language-plaintext highlighter-rouge">JSON::ParserError</code>. The analyzer passes <code class="language-plaintext highlighter-rouge">allow_duplicate_key: true</code> now.</p>

<p><a href="https://github.com/rails/rails/pull/59380">Read libvips’ orientation field in the Vips image analyzer</a><br />
The analyzer parsed the <code class="language-plaintext highlighter-rouge">exif-ifd0-Orientation</code> label to decide whether width and height are swapped. It reads libvips’ normalized <code class="language-plaintext highlighter-rouge">orientation</code> field instead, the same one <code class="language-plaintext highlighter-rouge">autorot</code> uses when generating variants, so the reported dimensions match the variant by construction. It also covers formats that keep the orientation outside an EXIF block, like TIFF.</p>

<p><a href="https://github.com/rails/rails/pull/59374">Write Duration#iso8601 values as plain decimal numbers</a><br />
Very small or very large float parts came out in scientific notation and rational parts as fractions, neither of which is valid ISO 8601, so <code class="language-plaintext highlighter-rouge">ActiveSupport::Duration.parse</code> couldn’t read them back:</p>

<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="mf">0.00005</span><span class="p">.</span><span class="nf">seconds</span><span class="p">.</span><span class="nf">iso8601</span>     <span class="c1"># =&gt; "PT0.00005S", was "PT5.0e-05S"</span>
<span class="no">Rational</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">2</span><span class="p">).</span><span class="nf">days</span><span class="p">.</span><span class="nf">iso8601</span> <span class="c1"># =&gt; "P1.5D", was "P3/2D"</span>
</code></pre></div></div>

<p><a href="https://github.com/rails/rails/pull/59320">Ignore blank forwarded hosts during request host extraction</a><br />
An <code class="language-plaintext highlighter-rouge">X-Forwarded-Host</code> header of just a comma left <code class="language-plaintext highlighter-rouge">raw_host_with_port</code> as <code class="language-plaintext highlighter-rouge">nil</code>, and <code class="language-plaintext highlighter-rouge">request.host</code> then raised a <code class="language-plaintext highlighter-rouge">NoMethodError</code>. A blank forwarded host falls back to the <code class="language-plaintext highlighter-rouge">Host</code> header now, and non-blank ones keep their existing precedence.</p>

<p><a href="https://github.com/rails/rails/pull/59308">Instrument connection pool checkout waits</a><br />
There is a new <code class="language-plaintext highlighter-rouge">checkout_wait.active_record</code> notification, emitted when a connection checkout has to wait because the pool is full, with the wait itself as the event’s duration and the error in the payload if it times out. You can finally measure pool saturation without patching <code class="language-plaintext highlighter-rouge">ConnectionPool</code>.</p>

<p><a href="https://github.com/rails/rails/pull/59221">Add Northwest Territories time zone mapping</a><br />
The Northwest Territories no longer share their winter clocks with US Mountain time, so there is a new <code class="language-plaintext highlighter-rouge">Northwest Territories</code> entry in the mapping. <code class="language-plaintext highlighter-rouge">Mountain Time (US &amp; Canada)</code> stays on <code class="language-plaintext highlighter-rouge">America/Denver</code> for compatibility, but prefer the new one, or the IANA <code class="language-plaintext highlighter-rouge">America/Inuvik</code>, for users in that region.</p>

<p><a href="https://github.com/rails/rails/pull/58728">Read structure dump exclusions from the database being dumped</a><br />
The ignored table list for a structure dump was read through whatever connection happened to be current rather than the database being dumped, so the wrong tables were excluded. The dump opens a connection to the config it is dumping now. MySQL and SQLite still shell out without connecting at all when the list is empty.</p>

<p><a href="https://github.com/rails/rails/pull/58667">Apply has_many default_order: when the association is preloaded</a><br />
The <code class="language-plaintext highlighter-rouge">default_order:</code> option on a <code class="language-plaintext highlighter-rouge">has_many</code> never reached the preloader, so preloaded records came back unordered while lazy loading them was ordered. The reflection passes the option along now, so both forms behave the same. Ordering is still not applied on the JOIN path, but that was already true for the lambda form.</p>

<p><a href="https://github.com/rails/rails/pull/58442">Wrap PostgreSQL null byte error in ActiveRecord::NullByteError</a><br />
PostgreSQL cannot store null bytes in text columns, and until now all you got was the <code class="language-plaintext highlighter-rouge">pg</code> gem’s generic <code class="language-plaintext highlighter-rouge">ArgumentError</code>, which you could only catch by rescuing every <code class="language-plaintext highlighter-rouge">ArgumentError</code> or matching on the message. It is wrapped in <code class="language-plaintext highlighter-rouge">ActiveRecord::NullByteError</code> now, a subclass of <code class="language-plaintext highlighter-rouge">ActiveRecord::StatementInvalid</code>, with the original error in <code class="language-plaintext highlighter-rouge">#cause</code>:</p>

<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">begin</span>
  <span class="no">Book</span><span class="p">.</span><span class="nf">create!</span><span class="p">(</span><span class="ss">name: </span><span class="s2">"a</span><span class="se">\0</span><span class="s2">b"</span><span class="p">)</span>
<span class="k">rescue</span> <span class="no">ActiveRecord</span><span class="o">::</span><span class="no">NullByteError</span>
  <span class="c1"># handle invalid input</span>
<span class="k">end</span>
</code></pre></div></div>
<p>If you were rescuing <code class="language-plaintext highlighter-rouge">ArgumentError</code> around queries for this, you need to update it.</p>

<p><a href="https://github.com/rails/rails/pull/58315">Fix belongs_to <em>touch</em> option incorrectly triggering on models with composite primary keys</a><br />
With a composite primary key, <code class="language-plaintext highlighter-rouge">touch</code> reconstructed the previous parent’s key even when some of its columns were nil, and then went looking for a parent with <code class="language-plaintext highlighter-rouge">IS NULL</code> conditions that can never match a real record. The lookup is skipped when any component is nil, which is what the single-column branch already did.</p>

<p><a href="https://github.com/rails/rails/pull/58118">Action Controller: Fix bug to support <em>render(renderable: …) { … }</em></a><br />
The block passed to <code class="language-plaintext highlighter-rouge">render</code> wasn’t forwarded along the rendering chain, so <code class="language-plaintext highlighter-rouge">render renderable: something do ... end</code> silently ignored it.</p>

<p><em>You can view the whole list of changes <a href="https://github.com/rails/rails/compare/@%7B2026-10-30%7D...main@%7B2026-11-06%7D">here</a>.</em><br />
<em>We had <a href="https://contributors.rubyonrails.org/contributors/in-time-window/20261030-20261106">46 contributors</a> to the Rails codebase this past week!</em></p>

<p>Until next time!</p>

<p><em><a href="https://world.hey.com/this.week.in.rails">Subscribe</a> to get these updates mailed to you.</em></p>]]></content><author><name>Greg</name></author><category term="news" /><summary type="html"><![CDATA[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!]]></summary></entry><entry><title type="html">Rails Versions 8.0.5.2 and 8.1.4.1 have been released!</title><link href="https://rubyonrails.org/2026/11/4/Rails-8.0.5.2-and-8.1.4.1-have-been-released" rel="alternate" type="text/html" title="Rails Versions 8.0.5.2 and 8.1.4.1 have been released!" /><published>2026-11-04T02:30:00+00:00</published><updated>2026-11-04T02:30:00+00:00</updated><id>https://rubyonrails.org/2026/11/4/Rails-8.0.5.2-and-8.1.4.1-have-been-released</id><content type="html" xml:base="https://rubyonrails.org/2026/11/4/Rails-8.0.5.2-and-8.1.4.1-have-been-released"><![CDATA[<p>Hello, Rails community!</p>

<p>Rails Versions 8.0.5.2 and 8.1.4.1 have been released. These are <strong>security updates</strong> addressing 21 security issues falling into a few themes:</p>

<ul>
  <li>Possible arbitrary file read, file write and remote code execution in Active Storage image and video processing</li>
  <li>Possible Strong Parameters bypass in <code class="language-plaintext highlighter-rouge">Parameters#each_key</code></li>
  <li>Possible IP spoofing in <code class="language-plaintext highlighter-rouge">remote_ip</code> through the <code class="language-plaintext highlighter-rouge">Forwarded</code> header (8.1 only)</li>
  <li>Multiple possible XSS vulnerabilities in Action View helpers, and one in the Active Support MessagePack serializer (8.1 only)</li>
  <li>Possible DoS vulnerabilities in Active Support <code class="language-plaintext highlighter-rouge">safe_constantize</code>, Action Controller Live streaming, and Active Storage proxy mode and filename handling</li>
  <li>Unsigned <code class="language-plaintext highlighter-rouge">Content-Type</code> and unenforced file size in Active Storage direct uploads to Google Cloud Storage</li>
  <li>Session handling issues: a destroyed session restored by <code class="language-plaintext highlighter-rouge">CacheStore</code>, a session cookie leaked by Active Storage proxy mode, and a missing <code class="language-plaintext highlighter-rouge">SameSite</code> attribute on session cookies</li>
  <li>Possible cache poisoning through content negotiation</li>
  <li>Possible signature replay in Action Mailbox Mailgun ingress</li>
</ul>

<p>We strongly recommend upgrading as soon as possible.</p>

<p>Older versions of Rails are unsupported, and users are recommended to upgrade to at least the 8.0 series. Security support for the 8.0 series ends on November 7, 2026. See our <a href="https://rubyonrails.org/maintenance">maintenance policy</a> for details.</p>

<p>Here is a list of security issues that these releases address:</p>

<ul>
  <li><a href="https://github.com/rails/rails/security/advisories/GHSA-f3w6-w445-fwh9">GHSA-f3w6-w445-fwh9 Possible arbitrary file write and read in Active Storage image analysis</a> (Critical)</li>
  <li><a href="https://github.com/rails/rails/security/advisories/GHSA-v924-7rp8-4mxh">GHSA-v924-7rp8-4mxh Possible arbitrary file read and remote code execution in Active Storage video previews, analysis and image processing</a> (High)</li>
  <li><a href="https://github.com/rails/rails/security/advisories/GHSA-wm3x-v3qw-4jh3">GHSA-wm3x-v3qw-4jh3 Possible Strong Parameters bypass in <code class="language-plaintext highlighter-rouge">Parameters#each_key</code> in Action Pack</a> (High)</li>
  <li><a href="https://github.com/rails/rails/security/advisories/GHSA-2gff-2mmg-m73p">GHSA-2gff-2mmg-m73p Possible IP spoofing in Action Dispatch <code class="language-plaintext highlighter-rouge">RemoteIp</code></a> (8.1 only) (High)</li>
  <li><a href="https://github.com/rails/rails/security/advisories/GHSA-8474-xrp6-wh69">GHSA-8474-xrp6-wh69 Possible DoS vulnerability in Active Support <code class="language-plaintext highlighter-rouge">safe_constantize</code></a> (High)</li>
  <li><a href="https://github.com/rails/rails/security/advisories/GHSA-2p2f-4rq4-gjwc">GHSA-2p2f-4rq4-gjwc Possible XSS vulnerability in Action View text helpers</a> (Medium)</li>
  <li><a href="https://github.com/rails/rails/security/advisories/GHSA-v6rj-xm57-3p59">GHSA-v6rj-xm57-3p59 Possible XSS vulnerability in Action View highlight helper</a> (Medium)</li>
  <li><a href="https://github.com/rails/rails/security/advisories/GHSA-rq8q-p985-fjq7">GHSA-rq8q-p985-fjq7 Possible XSS vulnerability in Action View <code class="language-plaintext highlighter-rouge">strip_tags</code></a> (Medium)</li>
  <li><a href="https://github.com/rails/rails/security/advisories/GHSA-68p9-83h6-5wpj">GHSA-68p9-83h6-5wpj Possible XSS vulnerability in Action View tag helpers</a> (Medium)</li>
  <li><a href="https://github.com/rails/rails/security/advisories/GHSA-2w9f-fxwj-w2qf">GHSA-2w9f-fxwj-w2qf Possible XSS vulnerability in Active Support MessagePack serializer</a> (8.1 only) (Medium)</li>
  <li><a href="https://github.com/rails/rails/security/advisories/GHSA-rwvh-fw6r-pwvp">GHSA-rwvh-fw6r-pwvp Possible DoS vulnerability in Action Controller Live streaming</a> (Medium)</li>
  <li><a href="https://github.com/rails/rails/security/advisories/GHSA-4v2w-w6g6-f8f8">GHSA-4v2w-w6g6-f8f8 Possible DoS vulnerability in Active Storage proxy mode via storage errors during streaming</a> (Medium)</li>
  <li><a href="https://github.com/rails/rails/security/advisories/GHSA-p2pm-g2h6-7j5j">GHSA-p2pm-g2h6-7j5j Possible DoS vulnerability in Active Storage filename handling</a> (Medium)</li>
  <li><a href="https://github.com/rails/rails/security/advisories/GHSA-3w93-6hmw-whh4">GHSA-3w93-6hmw-whh4 Unsigned Content-Type in Active Storage GCS direct uploads with <code class="language-plaintext highlighter-rouge">cache_control</code></a> (Medium)</li>
  <li><a href="https://github.com/rails/rails/security/advisories/GHSA-hfr4-8rjc-97m2">GHSA-hfr4-8rjc-97m2 Possible circumvention of file size limits in Active Storage direct uploads to Google Cloud Storage</a> (Medium)</li>
  <li><a href="https://github.com/rails/rails/security/advisories/GHSA-2586-8ghr-69fj">GHSA-2586-8ghr-69fj Possible restoration of destroyed sessions in Action Dispatch <code class="language-plaintext highlighter-rouge">CacheStore</code></a> (Medium)</li>
  <li><a href="https://github.com/rails/rails/security/advisories/GHSA-x6mj-8jx9-qhqv">GHSA-x6mj-8jx9-qhqv Possible sensitive session information leak in Active Storage proxy mode</a> (Medium)</li>
  <li><a href="https://github.com/rails/rails/security/advisories/GHSA-r9jg-fmfx-2gv6">GHSA-r9jg-fmfx-2gv6 Possible cache poisoning in Action Pack content negotiation</a> (Medium)</li>
  <li><a href="https://github.com/rails/rails/security/advisories/GHSA-3f4q-8x5m-76v8">GHSA-3f4q-8x5m-76v8 Possible local file disclosure in Active Storage video previews and analysis</a> (Low)</li>
  <li><a href="https://github.com/rails/rails/security/advisories/GHSA-5957-c7qm-m469">GHSA-5957-c7qm-m469 Possible signature replay in Action Mailbox Mailgun ingress</a> (Low)</li>
  <li><a href="https://github.com/rails/rails/security/advisories/GHSA-gmj8-hvj3-49mw">GHSA-gmj8-hvj3-49mw Missing SameSite attribute on session cookies from Action Pack session stores</a> (Low)</li>
</ul>

<p>Each GHSA links to patches that may be useful if you cannot immediately upgrade.</p>

<h2 id="sha-256">SHA-256</h2>

<p>If you’d like to verify that your gems are the same as the ones we’ve uploaded,
please use these SHA-256 hashes.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>6841f8f3e2e605b8ac95369cbcd5a323ebc4b399e65b60fba309ec6e16b22b76  pkg/actioncable-8.0.5.2.gem
45fa1d741696c0939d3724b660286f247fd1b676e084b22e68cb22c38486b78c  pkg/actionmailbox-8.0.5.2.gem
b3a86551c40a67ce00349573d83a60588a92a404d850bc3541b58cdfe831da9e  pkg/actionmailer-8.0.5.2.gem
5b96a0a841192954151047b4f6e8d992d56f767922e53b9e2c94449a26aebd61  pkg/actionpack-8.0.5.2.gem
de4f3d9faea828f56be86dd48ade24d5f87b0318f0282fcdab338b754d4ad7f1  pkg/actiontext-8.0.5.2.gem
8bba8b4a165a555eda0d9bf1c035de0644a77b6700fc5f214a7c0f75ae241cab  pkg/actionview-8.0.5.2.gem
7360cc455bd78d5f215ffaa062b229ac68bf8ba41c963d96a919ebc5f0e3618e  pkg/activejob-8.0.5.2.gem
8aabf86d1dc1516f47329d0cc8d61dea2af9652606e1bbfa467558bef615f375  pkg/activemodel-8.0.5.2.gem
f2abc9288493a2ca9617a2287c229daad425d2eeb74f44027a8cdb3b46055d14  pkg/activerecord-8.0.5.2.gem
556c548b9b0ae5ddc3ec4e5278c065cb48d0fa5ca93c1f2a020e484b8e4c1d44  pkg/activestorage-8.0.5.2.gem
673acec3133cc8108a03d5ae0e3a9d0f5c7f818d02db33bcfed527a6c57bcdd1  pkg/activesupport-8.0.5.2.gem
84bf06f0b96ebf625f4d120caa9c660f8fd09b3146acc1542679713b2cdda90a  pkg/rails-8.0.5.2.gem
4b43a2c134a1b9887dd9ef659c71f61e8376d18a8fc52a09471979666b919fa6  pkg/railties-8.0.5.2.gem
</code></pre></div></div>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>007670f7297973e94809e9f32a56624a7aa60b6e9d6696cd078064ce86d1c7fc  pkg/actioncable-8.1.4.1.gem
18b43dd842bf3a3e31b8e38b7917c21e48c128fc8b263c893481cc66ee1a8f78  pkg/actionmailbox-8.1.4.1.gem
a7b71dedf744e48dd6751e97350634edce9a2f7beeceac332dcccb91729ad066  pkg/actionmailer-8.1.4.1.gem
8c6f2e7cbd2653ef0539bde1ff20eb3e2e264e366affe56f0ba7f06d3670cb4b  pkg/actionpack-8.1.4.1.gem
fb59611dc16e2b6bbfcec66793acfae6cdd64b1e35ef3f9175424f31e62c38da  pkg/actiontext-8.1.4.1.gem
d25b4d9cf8d0c0195ffcfe8b2cf3fcbe6fea54fd7c17f1a9cb8182881463f12b  pkg/actionview-8.1.4.1.gem
82c4c9311ea1016d5f7f134a0c5f9b6527cad5a6237f5f3f60aa17984ef36229  pkg/activejob-8.1.4.1.gem
063caf105372fbc98b2d789e4be23de63ac5c043f7d9330f04e2caddb7012805  pkg/activemodel-8.1.4.1.gem
bd65599ca0b5d210937f835d42c7aff69d271741c75aab022730be6cbce67e87  pkg/activerecord-8.1.4.1.gem
0f4e2f114f3584723a80a2c089aacc6170e765a0b2c385c9782e26ed78f05c66  pkg/activestorage-8.1.4.1.gem
16ac4f341ca65c85a1fcdb8ac73f68891aae9e3c4a6f9c3a27daed8b00017ed7  pkg/activesupport-8.1.4.1.gem
365c3a0ad2713bd6e60628e5e826622d4ca8dee60b5a7e560e9b20844e9650bc  pkg/rails-8.1.4.1.gem
ff2ef4b5a62cbc89811f88be11c776e2ed71b14dd012eae6a494d37994aa9782  pkg/railties-8.1.4.1.gem
</code></pre></div></div>]]></content><author><name>Mike Dalessio</name></author><category term="releases" /><summary type="html"><![CDATA[Hello, Rails community!]]></summary></entry><entry><title type="html">No tricks, just treats</title><link href="https://rubyonrails.org/2026/10/30/this-week-in-rails" rel="alternate" type="text/html" title="No tricks, just treats" /><published>2026-10-30T00:00:00+00:00</published><updated>2026-10-30T00:00:00+00:00</updated><id>https://rubyonrails.org/2026/10/30/this-week-in-rails</id><content type="html" xml:base="https://rubyonrails.org/2026/10/30/this-week-in-rails"><![CDATA[<p>Hi, it’s <a href="https://claudiob.github.io/">Claudio Baccigalupo</a>. Don’t be scared 🎃 this week’s changes to the Rails codebase are all treats. Let’s explore them.</p>

<p><a href="https://github.com/rails/rails/pull/57747">New guide to multiple databases in Active Record</a> <br />
As part of the Rails Foundation effort, the <a href="https://edgeguides.rubyonrails.org/active_record_multiple_databases.html">refreshed guide</a> is live, tackling the three-tier production configuration that new apps get by default.</p>

<p><a href="https://github.com/rails/rails/pull/59387">Tuning performance for deployment guide open for review</a> <br />
A PR that updates the guide to performance tuning is open. Your feedback is helpful, especially if you have experience tuning Rails apps in production.</p>

<p><a href="https://github.com/rails/rails/pull/59408">Don’t load Capybara and Selenium on boot in new applications</a> <br />
The generated <code class="language-plaintext highlighter-rouge">Gemfile</code> now declares <code class="language-plaintext highlighter-rouge">capybara</code> and <code class="language-plaintext highlighter-rouge">selenium-webdriver</code> with <code class="language-plaintext highlighter-rouge">require: false</code>. <code class="language-plaintext highlighter-rouge">ActionDispatch::SystemTestCase</code> already requires both when a system test is loaded, so test processes that don’t run system tests boot faster.</p>

<p><a href="https://github.com/rails/rails/pull/59370">Don’t render authenticity tokens under the :header_only CSRF strategy</a> <br />
<code class="language-plaintext highlighter-rouge">:header_only</code> verifies requests by their <code class="language-plaintext highlighter-rouge">Sec-Fetch-Site</code> header and never reads a token, yet forms, <code class="language-plaintext highlighter-rouge">button_to</code> and <code class="language-plaintext highlighter-rouge">csrf_meta_tags</code> were still generating one on every render. Now they render none, so a page’s bytes no longer change from one request to the next.</p>

<p><a href="https://github.com/rails/rails/pull/59371">Process each Action Cable connection’s commands in order</a> <br />
Commands from the same connection could previously run at the same time or out of order.</p>

<p><a href="https://github.com/rails/rails/pull/59351">Scope immutable_strings_by_default to string columns</a> <br />
The setting applied to every column whose type subclassed <code class="language-plaintext highlighter-rouge">ActiveModel::Type::String</code>, so <code class="language-plaintext highlighter-rouge">text</code> columns and PostgreSQL’s <code class="language-plaintext highlighter-rouge">xml</code>, <code class="language-plaintext highlighter-rouge">citext</code>, <code class="language-plaintext highlighter-rouge">ltree</code>, <code class="language-plaintext highlighter-rouge">tsvector</code> and <code class="language-plaintext highlighter-rouge">macaddr</code> columns were inferred as <code class="language-plaintext highlighter-rouge">:string</code>, losing their type.</p>

<p><a href="https://github.com/rails/rails/pull/59340">Render hidden=”until-found” as is</a> <br />
A string or symbol value of the <code class="language-plaintext highlighter-rouge">hidden</code> attribute is no longer replaced by <code class="language-plaintext highlighter-rouge">"hidden"</code>:</p>
<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">tag</span><span class="p">.</span><span class="nf">div</span><span class="p">(</span><span class="ss">hidden: </span><span class="s2">"until-found"</span><span class="p">)</span>
<span class="c1"># Before: &lt;div hidden="hidden"&gt;&lt;/div&gt;</span>
<span class="c1"># After:  &lt;div hidden="until-found"&gt;&lt;/div&gt;</span>
</code></pre></div></div>

<p><a href="https://github.com/rails/rails/pull/59448">Fix preloading has_many :through associations with source_type and conditions</a> <br />
There were <a href="https://github.com/rails/rails/pull/59448">four</a> <a href="https://github.com/rails/rails/pull/59446">PRs</a> <a href="https://github.com/rails/rails/pull/59444">this</a> <a href="https://github.com/rails/rails/pull/59443">week</a> fixing preloading of <code class="language-plaintext highlighter-rouge">:through</code> associations:</p>
<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="no">Post</span><span class="p">.</span><span class="nf">preload</span><span class="p">(</span><span class="ss">:tags</span><span class="p">,</span> <span class="ss">:inactive_tags</span><span class="p">).</span><span class="nf">first</span><span class="p">.</span><span class="nf">inactive_tags</span>
<span class="c1"># =&gt; no longer includes active tags</span>
</code></pre></div></div>

<p><a href="https://github.com/rails/rails/pull/59318">Fix left_joins and eager_load dropping an intermediate join</a> <br />
When the same through association was joined from different parent paths, the second path reused the join of the first, silently returning values from the wrong records.</p>

<p><a href="https://github.com/rails/rails/pull/59415">Exclude default_order from exists? and calculations</a> <br />
<code class="language-plaintext highlighter-rouge">exists?</code> and <a href="https://github.com/rails/rails/pull/59436">calculations</a> such as <code class="language-plaintext highlighter-rouge">count</code> already removed explicit ordering. Now they also remove <code class="language-plaintext highlighter-rouge">default_order</code>, which avoids invalid SQL on PostgreSQL.</p>

<p><a href="https://github.com/rails/rails/pull/59386">Keep query block scoped optimizer hints on the subquery for MySQL</a> <br />
For <code class="language-plaintext highlighter-rouge">count</code> with <code class="language-plaintext highlighter-rouge">limit</code>, <code class="language-plaintext highlighter-rouge">offset</code> or <code class="language-plaintext highlighter-rouge">distinct</code>, all optimizer hints used to move to the outer query, while table-level hints like <code class="language-plaintext highlighter-rouge">INDEX(posts idx)</code> were silently ignored.</p>

<p><a href="https://github.com/rails/rails/pull/59305">Deprecate ActiveRecord::Validations::NumericalityValidator</a> <br />
Active Record now uses <code class="language-plaintext highlighter-rouge">ActiveModel::Validations::NumericalityValidator</code> directly. The old constant still works with a deprecation warning.</p>

<p><a href="https://github.com/rails/rails/pull/59299">Deprecate the option accessors on ColumnDefinition</a> <br />
Use <code class="language-plaintext highlighter-rouge">options</code> instead, for example <code class="language-plaintext highlighter-rouge">column.options[:limit]</code> instead of <code class="language-plaintext highlighter-rouge">column.limit</code>.</p>

<p><a href="https://github.com/rails/rails/pull/59347">Fix CurrentAttributes defaults for attribute names given as strings</a></p>
<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">class</span> <span class="nc">Current</span> <span class="o">&lt;</span> <span class="no">ActiveSupport</span><span class="o">::</span><span class="no">CurrentAttributes</span>
  <span class="n">attribute</span> <span class="s2">"currency"</span><span class="p">,</span> <span class="ss">default: </span><span class="s2">"USD"</span>
<span class="k">end</span>

<span class="no">Current</span><span class="p">.</span><span class="nf">currency</span>
<span class="c1"># Before: nil</span>
<span class="c1"># After:  "USD"</span>
</code></pre></div></div>

<p><a href="https://github.com/rails/rails/pull/59314">Match URL-decoded query parameter names when filtering logs</a> <br />
A parameter such as <code class="language-plaintext highlighter-rouge">%70assword</code> is now matched by a <code class="language-plaintext highlighter-rouge">:password</code> filter in request and redirect logs.</p>

<p><a href="https://github.com/rails/rails/pull/59221">Add Northwest Territories to ActiveSupport::TimeZone::MAPPING</a> <br />
They no longer shares winter clocks with US Mountain time. Prefer <code class="language-plaintext highlighter-rouge">Northwest Territories</code> (or <code class="language-plaintext highlighter-rouge">America/Inuvik</code>) for users in that region.</p>

<p><a href="https://github.com/rails/rails/pull/59339">Use Markdown as the default API docs markup</a> <br />
Over the last few months, Xavier Noria has been quietly converting RDoc to Markdown across the frameworks. This symbolic patch completes that epic by making Markdown the default markup in the API generator.</p>

<p><a href="https://github.com/rails/rails/pull/59399">Decode and encode PostgreSQL integer arrays in C</a> <br />
Reading or writing an <code class="language-plaintext highlighter-rouge">integer[]</code> or <code class="language-plaintext highlighter-rouge">bigint[]</code> column no longer allocates one String per element.
Other performance PRs that landed this week: <a href="https://github.com/rails/rails/pull/59430">cache the keyed HMAC in MessageVerifier</a>, speed up <a href="https://github.com/rails/rails/pull/59421">Time.zone.today</a> and <a href="https://github.com/rails/rails/pull/59437">Date</a>, <a href="https://github.com/rails/rails/pull/59407">unroll the form builder helpers</a>, call <a href="https://github.com/rails/rails/pull/59403">render_in optimistically</a>, <a href="https://github.com/rails/rails/pull/59316">reduce allocations when building URLs</a>, and make <a href="https://github.com/rails/rails/pull/59356">Symbol#to_param</a> return the frozen <code class="language-plaintext highlighter-rouge">Symbol#name</code>.</p>

<p><em>You can view the whole list of changes <a href="https://github.com/rails/rails/compare/@%7B2026-10-23%7D...main@%7B2026-10-30%7D">here</a>.</em>
<em>We had <a href="https://contributors.rubyonrails.org/contributors/in-time-window/20261023-20261030">33 contributors</a> to the Rails codebase this past week!</em></p>

<p>Until next time!</p>

<p><em><a href="https://world.hey.com/this.week.in.rails">Subscribe</a> to get these updates mailed to you.</em></p>]]></content><author><name>Claudio Baccigalupo</name></author><category term="news" /><summary type="html"><![CDATA[Hi, it’s Claudio Baccigalupo. Don’t be scared 🎃 this week’s changes to the Rails codebase are all treats. Let’s explore them.]]></summary></entry><entry><title type="html">Safer secrets, ZJIT, and more!</title><link href="https://rubyonrails.org/2026/10/23/this-week-in-rails" rel="alternate" type="text/html" title="Safer secrets, ZJIT, and more!" /><published>2026-10-23T00:00:00+00:00</published><updated>2026-10-23T00:00:00+00:00</updated><id>https://rubyonrails.org/2026/10/23/this-week-in-rails</id><content type="html" xml:base="https://rubyonrails.org/2026/10/23/this-week-in-rails"><![CDATA[<p>New apps stop falling back to Marshal for signed messages, the local secret file is no longer world-readable, and SQLite finally renames columns the way the database intended. Here’s what’s new in Rails:</p>

<p><a href="https://github.com/rails/rails/pull/59156">Default config.active_support.message_serializer to :json for 8.2</a> <br />
With <code class="language-plaintext highlighter-rouge">config.load_defaults 8.2</code>, messages from <code class="language-plaintext highlighter-rouge">MessageVerifier</code> and <code class="language-plaintext highlighter-rouge">MessageEncryptor</code> no longer fall back to deserializing Marshal payloads. That covers signed IDs, signed GlobalIDs, Active Storage keys, and the rest. Apps on 7.1 through 8.1 keep <code class="language-plaintext highlighter-rouge">:json_allow_marshal</code>. Confirm nothing still arrives as Marshal via the <code class="language-plaintext highlighter-rouge">message_serializer_fallback.active_support</code> notification before you switch.</p>

<p><a href="https://github.com/rails/rails/pull/59247">Create tmp/local_secret.txt with owner-only permissions</a> <br />
The development and test <code class="language-plaintext highlighter-rouge">secret_key_base</code> file was created with the process umask, often <code class="language-plaintext highlighter-rouge">022</code>, so it was world-readable. It is now written as <code class="language-plaintext highlighter-rouge">0600</code>, and an existing file is tightened on read on non-Windows platforms, matching <code class="language-plaintext highlighter-rouge">config/master.key</code>.</p>

<p><a href="https://github.com/rails/rails/pull/59218">Keep route redirects from a string template on the request host</a> <br />
<code class="language-plaintext highlighter-rouge">redirect("/%{path}")</code> could turn <code class="language-plaintext highlighter-rouge">GET /old/%2Finjected.example</code> into <code class="language-plaintext highlighter-rouge">//injected.example</code>, which browsers follow to another host. When interpolation would give the target a scheme or host the template does not name, the delimiter is now percent-encoded. Templates that already name a host, such as <code class="language-plaintext highlighter-rouge">redirect("//cdn.example.com/%{path}")</code>, are unchanged.</p>

<p><a href="https://github.com/rails/rails/pull/59183">Add config.zjit</a> <br />
Like <code class="language-plaintext highlighter-rouge">config.yjit</code>, this enables the JIT after boot so code that only runs while starting the app is not compiled. When ZJIT is available it takes precedence over YJIT, since only one JIT can be on.</p>

<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">config</span><span class="p">.</span><span class="nf">zjit</span> <span class="o">=</span> <span class="kp">true</span>
</code></pre></div></div>

<p><a href="https://github.com/rails/rails/pull/59204">Use native RENAME COLUMN for rename_column on SQLite</a> <br />
<code class="language-plaintext highlighter-rouge">rename_column</code> used to rebuild the table and copy index, check constraint, and virtual column SQL as written, so it failed when that SQL used the old column name. The rebuild also dropped triggers, broke foreign keys from other tables, and lost a string primary key. SQLite’s own <code class="language-plaintext highlighter-rouge">ALTER TABLE ... RENAME COLUMN</code> updates all of those.</p>

<p><a href="https://github.com/rails/rails/pull/59207">Fix in_order_of returning no records after a second serialize</a> <br />
Types whose serialized value changes when serialized again, such as deterministic encryption, <code class="language-plaintext highlighter-rouge">json</code> columns, and <code class="language-plaintext highlighter-rouge">serialize</code> coders, made <code class="language-plaintext highlighter-rouge">in_order_of</code> match nothing. Values are serialized once now.</p>

<p><a href="https://github.com/rails/rails/pull/59246">Fix numericality on a decimal attribute with implicit scale</a> <br />
A database-backed <code class="language-plaintext highlighter-rouge">decimal</code> column without an explicit scale stores integers, but the validator treated the original float as if no rounding happened. Validation now uses the value the attribute actually holds.</p>

<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># t.decimal :unscaled_bank_balance, precision: 10</span>
<span class="n">subject</span> <span class="o">=</span> <span class="no">NumericData</span><span class="p">.</span><span class="nf">new</span><span class="p">(</span><span class="ss">unscaled_bank_balance: </span><span class="mf">10_000_000.121</span><span class="p">)</span>
<span class="n">subject</span><span class="p">.</span><span class="nf">unscaled_bank_balance</span> <span class="c1"># =&gt; 10000000</span>
<span class="n">subject</span><span class="p">.</span><span class="nf">valid?</span>                <span class="c1"># =&gt; true</span>
</code></pre></div></div>

<p><a href="https://github.com/rails/rails/pull/59248">Allow Active Record objects in the tuple where syntax</a> <br />
The single-column form already accepted records. A record in a column tuple is now expanded to its primary key values. The same change fixes arrays of objects that delegate <code class="language-plaintext highlighter-rouge">#id</code>: only a one-element array was expanded before, so a longer list compared against <code class="language-plaintext highlighter-rouge">NULL</code>.</p>

<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="no">Cpk</span><span class="o">::</span><span class="no">Book</span><span class="p">.</span><span class="nf">where</span><span class="p">([</span><span class="ss">:author_id</span><span class="p">,</span> <span class="ss">:id</span><span class="p">]</span> <span class="o">=&gt;</span> <span class="n">book</span><span class="p">)</span>
<span class="no">Author</span><span class="p">.</span><span class="nf">where</span><span class="p">(</span><span class="ss">id: </span><span class="p">[</span><span class="n">decorator</span><span class="p">.</span><span class="nf">new</span><span class="p">(</span><span class="n">one</span><span class="p">),</span> <span class="n">decorator</span><span class="p">.</span><span class="nf">new</span><span class="p">(</span><span class="n">two</span><span class="p">)])</span>
</code></pre></div></div>

<p><a href="https://github.com/rails/rails/pull/59192">Raise when deliver_all_later is called with an already accessed message</a> <br />
<code class="language-plaintext highlighter-rouge">deliver_later</code> already raised in that situation. <code class="language-plaintext highlighter-rouge">ActionMailer.deliver_all_later</code> used to enqueue anyway and silently drop local changes.</p>

<p><a href="https://github.com/rails/rails/pull/59101">Truncate tables shadowed on the PostgreSQL search path</a> <br />
<code class="language-plaintext highlighter-rouge">db:truncate_all</code> and the reset of parallel test databases truncated the table a bare name resolves to twice and left the shadowed one untouched. They also failed on a table whose name contains a dot. Truncation now uses schema-qualified names from the catalog.</p>

<p><a href="https://github.com/rails/rails/pull/59175">Bump the minimum supported MySQL version to 5.7.9</a> <br />
That is the version where <code class="language-plaintext highlighter-rouge">innodb_default_row_format</code> defaults to <code class="language-plaintext highlighter-rouge">DYNAMIC</code>, so the old <code class="language-plaintext highlighter-rouge">ROW_FORMAT=DYNAMIC</code> workaround for indexing <code class="language-plaintext highlighter-rouge">utf8mb4</code> <code class="language-plaintext highlighter-rouge">varchar(255)</code> columns is gone. Tables are created without an explicit <code class="language-plaintext highlighter-rouge">ROW_FORMAT</code>.</p>

<p><a href="https://github.com/rails/rails/pull/59026">Add a before_ractorize load hook</a> <br />
<code class="language-plaintext highlighter-rouge">Rails::Application#ractorize!</code> now runs <code class="language-plaintext highlighter-rouge">ActiveSupport.on_load(:before_ractorize)</code> so frameworks, engines, and gems can prepare their own state before the app is made shareable. Framework ractorizing moved into each railtie instead of living inside <code class="language-plaintext highlighter-rouge">ractorize!</code>.</p>

<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="no">ActiveSupport</span><span class="p">.</span><span class="nf">on_load</span><span class="p">(</span><span class="ss">:before_ractorize</span><span class="p">)</span> <span class="k">do</span>
  <span class="no">MyGem</span><span class="p">.</span><span class="nf">make_shareable!</span>
<span class="k">end</span>
</code></pre></div></div>

<p><a href="https://github.com/rails/rails/pull/59325">Base deprecation proxies on BasicObject</a> <br />
<code class="language-plaintext highlighter-rouge">DeprecatedObjectProxy</code> and <code class="language-plaintext highlighter-rouge">DeprecatedInstanceVariableProxy</code> now inherit from <code class="language-plaintext highlighter-rouge">BasicObject</code>. Methods added to <code class="language-plaintext highlighter-rouge">Object</code> after Active Support loads, such as <code class="language-plaintext highlighter-rouge">to_json</code>, <code class="language-plaintext highlighter-rouge">to_param</code>, <code class="language-plaintext highlighter-rouge">blank?</code>, or <code class="language-plaintext highlighter-rouge">in?</code>, are forwarded to the deprecated object with a warning instead of running on the proxy.</p>

<p><a href="https://github.com/rails/rails/pull/59190">ParameterFilter#filter_param passes a one-pair hash to Proc filters</a> <br />
The third argument is now <code class="language-plaintext highlighter-rouge">{ key =&gt; value }</code>, the same hash <code class="language-plaintext highlighter-rouge">filter</code> would pass for that pair, instead of <code class="language-plaintext highlighter-rouge">nil</code>.</p>

<p><a href="https://github.com/rails/rails/pull/59206">Check ActiveModel::Attributes methods without building the attributes hash</a> <br />
<code class="language-plaintext highlighter-rouge">respond_to?</code> for a method that is not defined no longer calls <code class="language-plaintext highlighter-rouge">attributes</code>. A key that an <code class="language-plaintext highlighter-rouge">attributes</code> override adds, without an attribute or a method, no longer makes the model respond to it. Active Record already worked this way.</p>

<p><a href="https://github.com/rails/rails/pull/59181">Deprecate ssl_default_redirect_status</a>, <a href="https://github.com/rails/rails/pull/59191">raise_on_assign_to_attr_readonly</a>, and <a href="https://github.com/rails/rails/pull/59232">drop two PostgreSQL adapter checks</a> <br />
A few cleanups landed this week:</p>

<ul>
  <li><code class="language-plaintext highlighter-rouge">ActionDispatch::SSL</code>’s <code class="language-plaintext highlighter-rouge">ssl_default_redirect_status:</code> is deprecated. The default has been 308 since Rails 6.1, and using the middleware without the argument now uses 308 instead of 307.</li>
  <li><code class="language-plaintext highlighter-rouge">config.active_record.raise_on_assign_to_attr_readonly</code> has been a framework default since 7.1. It will be removed in 9.0 so attribute writers can be optimized further.</li>
  <li><code class="language-plaintext highlighter-rouge">supports_identity_columns?</code> and <code class="language-plaintext highlighter-rouge">supports_native_partitioning?</code> always returned true since PostgreSQL 10. They are gone.</li>
</ul>

<p><em>You can view the whole list of changes <a href="https://github.com/rails/rails/compare/@%7B2026-10-16%7D...main@%7B2026-10-23%7D">here</a>.</em>
<em>We had <a href="https://contributors.rubyonrails.org/contributors/in-time-window/20261016-20261023">40 contributors</a> to the Rails codebase this past week!</em></p>

<p>Until next time!</p>

<p><em><a href="https://world.hey.com/this.week.in.rails">Subscribe</a> to get these updates mailed to you.</em></p>]]></content><author><name>Emmanuel Hayford</name></author><category term="news" /><summary type="html"><![CDATA[New apps stop falling back to Marshal for signed messages, the local secret file is no longer world-readable, and SQLite finally renames columns the way the database intended. Here’s what’s new in Rails:]]></summary></entry><entry><title type="html">On Rails — Hussain Akram &amp;amp; Antonio Carlos de Souza: Rails Scales for the Rest of Us</title><link href="https://rubyonrails.org/2026/10/22/on-rails-hussain-akram-and-antonio-carlos-de-souza-donorbox" rel="alternate" type="text/html" title="On Rails — Hussain Akram &amp;amp; Antonio Carlos de Souza: Rails Scales for the Rest of Us" /><published>2026-10-22T00:00:00+00:00</published><updated>2026-10-22T00:00:00+00:00</updated><id>https://rubyonrails.org/2026/10/22/on-rails-hussain-akram-and-antonio-carlos-de-souza-donorbox</id><content type="html" xml:base="https://rubyonrails.org/2026/10/22/on-rails-hussain-akram-and-antonio-carlos-de-souza-donorbox"><![CDATA[<p>Hussain Akram is an engineering manager at <a href="https://donorbox.org">Donorbox</a> and Antonio Carlos de Souza (A.C.) is its chief architect, working on a Rails app that has helped nonprofits raise money online and in person for more than a decade.</p>

<p>Robby, Hussain, and A.C. get into how Donorbox handles serious traffic with a deliberately boring setup, why the team moved CI back onto developers' machines, and how they're pulling older parts of the app back toward Rails defaults. They also talk about how they use agent docs to steer AI tools toward the patterns they want the codebase to follow.</p>

<p><strong>Links:</strong></p>

<ul>
  <li><a href="https://donorbox.org">Donorbox</a></li>
  <li><a href="https://github.com/rails/solid_queue">Solid Queue</a></li>
  <li><a href="https://github.com/marcoroth/herb">Herb</a></li>
  <li><a href="https://github.com/basecamp/fizzy">Fizzy</a></li>
  <li><a href="https://github.com/basecamp/lexxy">Lexxy</a></li>
  <li><a href="https://github.com/rails/rubocop-rails-omakase">RuboCop Rails Omakase</a></li>
  <li><a href="https://github.com/presidentbeef/brakeman">Brakeman</a></li>
  <li><a href="https://pragprog.com/titles/rails8/agile-web-development-with-rails-8/">Agile Web Development with Rails</a></li>
  <li><a href="https://pragprog.com/titles/eruby2/eloquent-ruby-second-edition/">Eloquent Ruby by Russ Olsen</a></li>
  <li><a href="https://www.pearson.com/en-us/subject-catalog/p/practical-object-oriented-design-an-agile-primer-using-ruby/P200000000472/9780134445571">Practical Object-Oriented Design in Ruby by Sandi Metz</a></li>
  <li><a href="https://www.pragmaticprogrammer.com/titles/tpp20/">The Pragmatic Programmer by Andrew Hunt and David Thomas</a></li>
</ul>

<p><a href="https://podcast.rubyonrails.org/2462975/episodes/19997194-hussain-akram-antonio-carlos-de-souza-rails-scales-for-the-rest-of-us">Listen to this episode on Buzzsprout</a> (1h 47m) or <a href="https://podcast.rubyonrails.org">subscribe to On Rails</a> in your podcast player of choice.</p>]]></content><author><name>Rails Foundation</name></author><category term="podcast" /><summary type="html"><![CDATA[Hussain Akram is an engineering manager at Donorbox and Antonio Carlos de Souza (A.C.) is its chief architect, working on a Rails app that has helped nonprofits raise money online and in person for more than a decade.]]></summary></entry><entry><title type="html">Faster blank? checks, safer SQLite rollbacks, and more!</title><link href="https://rubyonrails.org/2026/10/16/this-week-in-rails" rel="alternate" type="text/html" title="Faster blank? checks, safer SQLite rollbacks, and more!" /><published>2026-10-16T00:00:00+00:00</published><updated>2026-10-16T00:00:00+00:00</updated><id>https://rubyonrails.org/2026/10/16/this-week-in-rails</id><content type="html" xml:base="https://rubyonrails.org/2026/10/16/this-week-in-rails"><![CDATA[<p>Hi, it’s <a href="https://www.saeloun.com/team/vipul/">Vipul</a>. Let’s explore this week’s changes in the Rails codebase.</p>

<p><a href="https://rubyonrails.org/2026/10/13/agents-on-rails-stage-3">Agents on Rails: Can a model build on its own work?</a><br />
Stage 3 adds multi-step tasks where each ticket starts a fresh session, while files and notes carry forward. The benchmark now combines all three stages into one leaderboard, with tasks spanning legacy applications and new projects.</p>

<p>Here are some highlights from the changes merged to Rails <code class="language-plaintext highlighter-rouge">main</code> this week.</p>

<p><a href="https://github.com/rails/rails/pull/58745">Speed up String#blank? for ASCII strings</a><br />
<code class="language-plaintext highlighter-rouge">String#blank?</code> now checks ASCII-only strings by scanning their bytes instead of running a regular expression. Strings containing non-ASCII characters keep the existing regexp path and its encoding-specific whitespace handling. A <a href="https://github.com/rails/rails/pull/59030">follow-up</a> removes repeated <code class="language-plaintext highlighter-rouge">bytesize</code> calls from the scan.</p>

<p><a href="https://github.com/rails/rails/pull/59083">Share read-only default attributes in Active Record</a><br />
Active Record now shares a read-only set of default attributes when it can, with a per-Ractor fallback for defaults that cannot be shared. In the PR author’s ruby-bench Active Record run, average time excluding warm-up iterations fell from 199 ms to 170 ms; the same PR reports 134 ms for Rails 8.1.4.</p>

<p><a href="https://github.com/rails/rails/pull/59118">Render collections with fewer intermediate objects</a><br />
Action View now renders collection partials into one shared output buffer when neither collection caching nor a per-item layout needs the items separately. This avoids allocating buffers and rendered-template wrappers just to concatenate them afterward. Collections using caching or per-item layouts keep their existing rendering path.</p>

<p><a href="https://github.com/rails/rails/pull/59018">Only consult connection pools the execution context has used</a><br />
Active Record now tracks which pools an execution context has used. Checking for open transactions, releasing active connections, and clearing query caches only consult that subset. This reduces bookkeeping for applications with many configured pools; the PR notes that most applications won’t see a difference.</p>

<p><a href="https://github.com/rails/rails/pull/59033">Preserve the original error when SQLite rolls back a transaction</a><br />
SQLite can roll back a transaction itself after errors such as a full disk. Rails used to issue another rollback, masking the original failure with “cannot rollback - no transaction is active” and skipping record cleanup. It now avoids the redundant rollback, preserves the original failure as the cause of <code class="language-plaintext highlighter-rouge">ActiveRecord::StatementInvalid</code>, restores record state, and runs <code class="language-plaintext highlighter-rouge">after_rollback</code> callbacks.</p>

<p><a href="https://github.com/rails/rails/pull/59017">Include PostgreSQL extension schemas in schema dumps</a><br />
Following the <a href="https://rubyonrails.org/2026/9/25/this-week-in-rails">earlier extension-dumping fixes</a>, this covers relocatable extensions such as <code class="language-plaintext highlighter-rouge">pg_trgm</code> in schemas outside <code class="language-plaintext highlighter-rouge">dump_schemas</code>. Rails now emits <code class="language-plaintext highlighter-rouge">create_schema</code> with <code class="language-plaintext highlighter-rouge">if_not_exists: true</code> for schemas referenced by dumped extensions, so loading the dump works whether the schema already exists or needs to be created.</p>

<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">create_schema</span> <span class="s2">"extensions"</span><span class="p">,</span> <span class="ss">if_not_exists: </span><span class="kp">true</span>
<span class="n">enable_extension</span> <span class="s2">"extensions.pg_trgm"</span>
</code></pre></div></div>

<p><a href="https://github.com/rails/rails/pull/59059">Fix join order when eager loading with merged joins</a><br />
Combining <code class="language-plaintext highlighter-rouge">eager_load</code> with joins merged from another model could generate SQL that referenced a table before joining it. Rails now puts the eager-load joins first. A <a href="https://github.com/rails/rails/pull/59060">related fix</a> handles the same ordering problem with <code class="language-plaintext highlighter-rouge">left_joins</code>.</p>

<p><a href="https://github.com/rails/rails/pull/59061">Fix eager loading with a limit and a CTE join</a><br />
Combining a CTE join, <code class="language-plaintext highlighter-rouge">eager_load</code>, and <code class="language-plaintext highlighter-rouge">limit</code> could raise <code class="language-plaintext highlighter-rouge">ActiveRecord::ConfigurationError</code> because Rails treated the CTE name as an association name. The limit check now recognizes CTE joins and accounts for their ability to match multiple rows.</p>

<p><a href="https://github.com/rails/rails/pull/58975">Keep Active Job retry counts out of the original payload</a><br />
Deserialized jobs now get their own copy of <code class="language-plaintext highlighter-rouge">exception_executions</code>. Retrying a job no longer changes the counters in the original job data or earlier entries in the test adapter’s <code class="language-plaintext highlighter-rouge">performed_jobs</code>, and frozen job payloads no longer raise <code class="language-plaintext highlighter-rouge">FrozenError</code> on this path.</p>

<p><a href="https://github.com/rails/rails/pull/59075">Fix composite-key association queries</a><br />
Empty tuple conditions and empty composite-key association conditions now return no records without issuing a query, instead of generating <code class="language-plaintext highlighter-rouge">WHERE ()</code>. Polymorphic association queries also accept relations targeting composite-key models, and querying a composite-key association with a bare ID raises an explanatory <code class="language-plaintext highlighter-rouge">ArgumentError</code>.</p>

<p><a href="https://github.com/rails/rails/pull/58881">Keep connected_to state isolated between streaming and request threads</a><br />
<code class="language-plaintext highlighter-rouge">ActionController::Live</code> shared the request’s <code class="language-plaintext highlighter-rouge">connected_to</code> stack with its streaming thread, so leaving a block in one thread could change the shard and role seen by the other. Rails now replaces the stack with a modified copy when pushing or popping, preserving each thread’s connection context.</p>

<p><a href="https://github.com/rails/rails/pull/59092">Detect Aube as a JavaScript package manager</a><br />
Rails generators now recognize <code class="language-plaintext highlighter-rouge">aube-lock.yaml</code> when detecting an application’s JavaScript package manager.</p>

<p><em>You can view the whole list of changes <a href="https://github.com/rails/rails/compare/@%7B2026-10-09%7D...main@%7B2026-10-16%7D">here</a>.</em><br />
<em>We had <a href="https://contributors.rubyonrails.org/contributors/in-time-window/20261009-20261016">30 contributors</a> to the Rails codebase this past week!</em></p>

<p>Until next time!</p>

<p><em><a href="https://world.hey.com/this.week.in.rails">Subscribe</a> to get these updates mailed to you.</em></p>]]></content><author><name>vipulnsward</name></author><category term="news" /><summary type="html"><![CDATA[Hi, it’s Vipul. Let’s explore this week’s changes in the Rails codebase.]]></summary></entry><entry><title type="html">Agents on Rails: Stage 3. Can a model build on its own work?</title><link href="https://rubyonrails.org/2026/10/13/agents-on-rails-stage-3" rel="alternate" type="text/html" title="Agents on Rails: Stage 3. Can a model build on its own work?" /><published>2026-10-13T00:00:00+00:00</published><updated>2026-10-13T00:00:00+00:00</updated><id>https://rubyonrails.org/2026/10/13/agents-on-rails-stage-3</id><content type="html" xml:base="https://rubyonrails.org/2026/10/13/agents-on-rails-stage-3"><![CDATA[<p>Now that we understand better how agents deal with contained tasks and contained codebases, it’s time to push them a little harder. Stage 3 adds a set of large multi-step tasks that test how well a model can build on its own work over multiple sessions without turning it into a hot mess. We’ve also greatly expanded the variety of apps we test the models on.</p>

<p>Finally, we revisited Stages 1 and 2 to combine all three into a single benchmark that answers one question: which model is the best all-rounder for tasks large and small in your Rails apps?</p>

<p>We chose nine models for this stage and used our test runs to pick reasoning settings, aiming to balance capability and cost. We ran <strong>Claude Opus 5.5</strong>, <strong>GPT-6 Astra</strong> and <strong>GPT-6.1 Sol</strong> at xhigh; <strong>Grok 4.7</strong> at high; and <strong>GPT-6 Luna</strong>, <strong>Kimi K3</strong>, <strong>DeepSeek 4.1 Flash</strong>, <strong>GLM 5.3 Flash</strong> and <strong>Muse Spark 1.3</strong> at max. We also tested Opus and Astra at medium to see what extra effort buys.</p>

<p>Here are the results:</p>

<p style="text-align: center;"><img src="/assets/images/evals-stage-3-scoreboard.png" style="width: 100%;" alt="Score cards for 11 model configurations across the combined Agents on Rails benchmark, showing success rates and average time, steps, and cost per run. Claude Opus 5.5 at xhigh leads with 65.3%." /></p>

<p>And these are the highlights:</p>

<ul>
  <li><strong>Most accurate:</strong> Claude Opus 5.5 at xhigh, with 65.3% success. It also leads on the new multi-step tasks in Stage 3, at 72.2%.</li>
  <li><strong>Cheapest:</strong> GPT-6 Luna at max, with 43.4% success for about $0.19 per run.</li>
  <li><strong>Fastest:</strong> GPT-6 Astra at medium, 16m 36s mean time per run with 62.3% success.</li>
  <li><strong>Best combination of all three:</strong> GPT-6.1 Sol at xhigh: 60.8% credit, about $0.80 and 23m 35s per run.</li>
</ul>

<h2 id="why-stage-3">Why Stage 3?</h2>

<p><a href="/2026/8/13/agents-on-rails-the-first-benchmark-report">Stage 1</a> asked whether a model knows Rails. <a href="/2026/9/9/agents-on-rails-stage-2">Stage 2</a> asked whether it can ship a feature. Both give the agent one session and a prepared codebase. It never comes back to its own code.</p>

<p>Real projects don’t work like that. Features pile on top of each other, and early decisions can have a butterfly effect on later sessions if you let an agent keep working on one area of your app for a while. So Stage 3 asks whether a model can build on its own work. Every new task is a series of tickets. Each ticket starts a fresh session: files and saved notes carry forward, but conversation history doesn’t.</p>

<p>We also ask how well it does across different contexts. After all, Writebook and Fizzy, which we used for the previous stages, are tidy, idiomatic 37signals apps. Plenty of real-world Rails apps are bigger, older, and… (let’s face it) messier. So we added tasks in a bunch of legacy projects: profiling Mastodon’s tests, upgrading Redmine to the latest Rails, migrating Forem’s profile pictures to Active Storage, and retiring a feature in the civic participation app, Consul Democracy. We also included a task in a more modern app: adding bots to Campfire.</p>

<p>Finally, we created two greenfield projects specifically for this stage: a helpdesk API that grows over eight tickets and a live quiz app with real-time updates.</p>

<h2 id="new-grading-one-leaderboard">New grading, one leaderboard</h2>

<p>Nobody likes complexity. Adding yet another separate benchmark wouldn’t help you make decisions, so we unified all three stages into a single benchmark that faithfully represents each one.</p>

<p>The challenge was finding a grading scheme that works for all task types. Previously, we used binary grading: pass or fail. This worked perfectly for Stage 1’s atomic tasks, which each tested exactly one thing. It still worked for Stage 2, but we started to notice that it was often too strict: a model could produce a reasonable but imperfect solution and still score zero (remember Luna’s 0.0 score?).</p>

<p>But for Stage 3, binary grading wasn’t an option. These tasks have many parts, and their solutions can’t be reduced to a simple “good” or “bad”. There’s a spectrum of solutions. So we introduced fractional grading.</p>

<p>The verifier is still deterministic, but now there are two types of checks: required and optional. Required checks test whether the solution meets the minimum bar. Failing any required check gives a score of zero. Passing all required final checks earns a base score, which depends on how difficult it is to build an MVP. Optional checks earn the rest, weighted by the importance of what they test.</p>

<p>Of course, this meant revisiting the previous two stages as well. We regraded the Stage 2 runs for this round’s models, and yes, it changed the results and made the grading fairer. Luna is no longer at the bottom of the leaderboard.</p>

<p>For Stage 1, the challenge was integrating API recall, previously a separate metric that doesn’t translate neatly to larger tasks. We folded it directly into the score: the existing behavior checks are required and earn a base score of 0.10; solutions using the idiomatic Rails API earn the rest. We also retired a few saturated tasks that no longer helped distinguish between models.</p>

<p>The combined score gives all 46 tasks equal weight: 19 atomic, 20 feature and 7 multi-step. We average runs within each task first, then average across tasks. We now use the same method for task time, replacing the median with a mean.</p>

<p>So, under the upgraded grading system, what did we discover?</p>

<h2 id="gpt-61-sol-is-a-top-tier-model-for-a-sixth-of-the-price">GPT-6.1 Sol is a top-tier model for a sixth of the price</h2>

<p><strong>Sol</strong> (xhigh) comes close to <strong>Astra</strong> (xhigh) overall: 60.8% against 62.3%. Mean run times are close too, at 23m 35s versus 22m 36s. On the new multi-step tasks alone, both earn 52.2% credit, but Sol costs about $2.79 per run against Astra’s $17.29.</p>

<p><strong>Opus</strong> on xhigh earns more success points than on medium (from 56.1% to 65.3%), but adding effort costs you in multiple ways: costs increase from $3.84 to $10.53 per run, and mean time rises from 28m 31s to 53m 31s. On the helpdesk app, both efforts earn about 52% credit, but at xhigh, Opus writes hundreds more tests for roughly five times the cost.</p>

<h2 id="test-failing-rewrite-the-test">Test failing? Rewrite the test!</h2>

<p>One of our new tasks asks the agent to build a live quiz app, one ticket at a time. The second ticket adds JSON export so moderators can share quizzes. It explicitly limits the export to two fields only: a title and questions, nothing else. A later ticket adds a setting for the number of winners.</p>

<p>In 9 of 12 GPT-6-family runs, the agent adds this setting to the export too, violating the earlier requirement. It then changes the export test it wrote earlier to accept the new field. Its own suite stays green, but the contract is broken.</p>

<p>Opus and DeepSeek record the two-field restriction in their notes and remember to apply it in later tickets. Some failing Astra runs record that same restriction (to include only two fields in the export), yet still add the winners setting to export later.</p>

<h2 id="cheaper-models-struggle-with-long-term-planning">Cheaper models struggle with long-term planning</h2>

<p>If you’ve been building with Rails for a while, you probably know about <code class="language-plaintext highlighter-rouge">ignored_columns</code> (and perhaps the <a href="https://github.com/ankane/strong_migrations#removing-a-column">strong_migrations gem</a>). Turns out some models don’t. One of our new tasks asks the agent to retire a feature in the Consul Democracy app over multiple steps. Opus, Astra and Sol add <code class="language-plaintext highlighter-rouge">ignored_columns</code> in every run. DeepSeek, GLM, Kimi, Muse and Luna never do: they assume that removing explicit references makes the later column drop safe.</p>

<p>Another task upgrades Redmine to the latest Rails and shows a similar pattern. Opus, Astra and Sol generally plan for both backward and forward compatibility between releases, as the instructions imply they should. Several other models fail to plan for cases such as rolling back to the previous release.</p>

<h2 id="greenfield-apps-arent-ready-for-production">Greenfield apps aren’t ready for production</h2>

<p>In our helpdesk task we grow a Rails API for a helpdesk SaaS over eight tickets, from signup to email integration. Seventeen runs finish them all, yet none configures a persistent production job queue. This includes Opus, Astra and Sol.</p>

<p>The models repeatedly choose to keep the app minimal. Several use <code class="language-plaintext highlighter-rouge">deliver_now</code> so tests can see the email immediately. That leaves requests waiting on mail delivery and background jobs without protection against a process restart. Only four of the 17 finished apps keep credentials out of logs, too.</p>

<p>The features get built, but production concerns stay optional unless we spell them out. Passing all the tickets still leaves work before deployment.</p>

<h2 id="each-model-has-a-distinct-personality">Each model has a distinct personality</h2>

<p>Read enough runs (and we certainly have) and the working styles become familiar.</p>

<p><strong>Kimi is the diligent profiler.</strong> Asked to speed up Mastodon’s tests, it measures a baseline, documents its findings across sessions, and checks risky changes with different random seeds. It solves all three attempts, making the measured model and request suites 2.4–2.9× faster.</p>

<p><strong>Grok is the explorer.</strong> It reads far more before editing: in the proposal-removal task, 123–146 files per run, compared with 6–61 for Opus, Astra and Sol. Its first edit comes more than halfway through both runs. We see the same habit across tasks: a long tour of the codebase before the first change.</p>

<p><strong>DeepSeek keeps trying to cheat.</strong> In the helpdesk task, it searches unreachable Git objects for hidden tests or an expected solution. “This is gold,” it declares. The discovery turns out to be earlier versions of its own files written in previous steps. It was trying to cheat off its own homework.</p>

<h2 id="how-we-ran-it">How we ran it</h2>

<p><strong>Corpus:</strong> 46 tasks; seven new multi-step tasks, with 3–8 tickets each.</p>

<p><strong>Models:</strong> 11 configurations, 135 scored runs each; 1,485 total, with no invalid runs.</p>

<p><strong>Attempts:</strong> three per task, except the helpdesk, Redmine upgrade and proposal removal, which get two.</p>

<p><strong>Budgets:</strong> task-specific. Multi-step defaults are 90 minutes and 400 turns per session, $60 per whole run. The largest allows three hours, 800 turns and $120.</p>

<p><strong>Harness:</strong> <a href="https://github.com/rails/lemans">lemans</a> and miniswen, with new features, bug fixes, DX improvements, and selective internet access to RubyGems.</p>

<p><strong>Judging:</strong> hidden deterministic checks, including browser and HTTP checks. No LLM judge contributes to the leaderboard.</p>

<h2 id="next-steps">Next steps</h2>

<p>The combined benchmark helps you choose a model for your Rails app. Next, we want to help you get more out of it.</p>

<p>We’ll test skills, code search and other tools on these same tasks. Can a better toolbox help GLM catch up? How much further can it take Opus? We want to find improvements you can bring back to your own apps.</p>

<p>And as usual, we will continue testing new models as they hit the market, so stay tuned for updates on Muse Wonder and other new models.</p>

<p>Check the leaderboard on <a href="/ai">Agents on Rails</a>, explore the <a href="https://github.com/rails/ai-evals">raw runs</a>, and <a href="https://github.com/rails/ai-evals/issues">suggest an experiment</a>. Let’s see how far we can push them!</p>]]></content><author><name>Alexander Baygeldin, Vladimir Dementyev, Aibek Izhanov</name></author><category term="agents" /><summary type="html"><![CDATA[Now that we understand better how agents deal with contained tasks and contained codebases, it’s time to push them a little harder. Stage 3 adds a set of large multi-step tasks that test how well a model can build on its own work over multiple sessions without turning it into a hot mess. We’ve also greatly expanded the variety of apps we test the models on.]]></summary></entry><entry><title type="html">Better ACL S3 control and more</title><link href="https://rubyonrails.org/2026/10/9/this-week-in-rails" rel="alternate" type="text/html" title="Better ACL S3 control and more" /><published>2026-10-09T00:00:00+00:00</published><updated>2026-10-09T00:00:00+00:00</updated><id>https://rubyonrails.org/2026/10/9/this-week-in-rails</id><content type="html" xml:base="https://rubyonrails.org/2026/10/9/this-week-in-rails"><![CDATA[<p>Hi, <a href="https://x.com/morgoth85">Wojtek</a> here. Let’s explore this week’s changes in the Rails codebase.</p>

<p><a href="https://github.com/rails/rails/pull/58781">Stop setting the public-read ACL on S3 uploads for services configured with public: true</a><br />
Bucket owner enforced is now both the default and the recommended S3 object ownership setting, and rejects any request that specifies an ACL. Uploading through a <em>public: true</em> service to such a bucket previously failed outright because Active Storage always attached a <em>public-read</em> ACL, with no way to opt out.
Setting this to <em>false</em> skips the ACL; grant public read access through a bucket policy instead. Buckets that still use ACLs can restore the previous behavior for a given service by setting the <em>acl</em> option explicitly in its <em>upload</em> configuration.</p>

<p><a href="https://github.com/rails/rails/pull/58923">Add maintenance_database option to the PostgreSQL adapter</a><br />
Database tasks connect to the <em>postgres</em> database by default. Some managed PostgreSQL services, such as DigitalOcean, do not provide a <em>postgres</em> database, so these tasks fail there. <em>maintenance_database</em> sets the database to connect to instead, like the <em>–maintenance-db</em>.</p>

<p><a href="https://github.com/rails/rails/pull/58860">Forward other options from has_one_attached and has_many_attached</a><br />
It is now possible to write:</p>
<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">class</span> <span class="nc">User</span> <span class="o">&lt;</span> <span class="no">ApplicationRecord</span>
  <span class="n">has_one_attached</span> <span class="ss">:avatar</span><span class="p">,</span> <span class="ss">deprecated: </span><span class="kp">true</span>
<span class="k">end</span>
</code></pre></div></div>

<p><a href="https://github.com/rails/rails/pull/58913">Freeze events emitted by ActiveSupport::EventReporter</a><br />
Subscribers can no longer change the event seen by later subscribers. Modifying the event in place now raises <em>FrozenError</em>, so <em>dup</em> it first.</p>

<p><a href="https://github.com/rails/rails/pull/58992">Fix rails.deprecation structured events not being emitted</a><br />
<em>Rails::StructuredEventSubscriber</em> was never required by the framework, so with <em>config.active_support.deprecation = :notify</em> no <em>rails.deprecation</em> structured event was ever emitted to <em>Rails.event</em>.</p>

<p><a href="https://github.com/rails/rails/pull/58846">Fix 5.1 version change_column to honor table_name_prefix</a><br />
Migrations declaring version 5.1 or earlier now honor <em>table_name_prefix</em> and <em>table_name_suffix</em>.</p>

<p><a href="https://github.com/rails/rails/pull/58845">Honor an explicit type on SQLite references in 6.0 migrations</a><br />
References without a <em>type:</em> are unchanged, ie the adapter still makes them integer.</p>

<p><em>You can view the whole list of changes <a href="https://github.com/rails/rails/compare/@%7B2026-10-02%7D...main@%7B2026-10-09%7D">here</a>.</em><br />
<em>We had <a href="https://contributors.rubyonrails.org/contributors/in-time-window/20261002-20261009">30 contributors</a> to the Rails codebase this past week!</em></p>

<p>Until next time!</p>

<p><em><a href="https://world.hey.com/this.week.in.rails">Subscribe</a> to get these updates mailed to you.</em></p>]]></content><author><name>Wojtek</name></author><category term="news" /><summary type="html"><![CDATA[Hi, Wojtek here. Let’s explore this week’s changes in the Rails codebase.]]></summary></entry></feed>