なるようになるブログ

読書感想文かrailsについてかrubyについてか

rails commit log流し読み(2026/11/29)

2026/11/29分のコミットです。

CHANGELOGへの追加はありませんでした。


Use key-value order and group in the remaining API docs and guides

docの修正です。

reorder、unscopeなどのexampleコードで、orderやgroupにSQL文字列を渡していたのを、key-value形式を使うよう修正しています。


Fix flaky test_find_with_a_multiple_sets_of_composite_primary_key_wrapped_in_an_array_ordered

activerecord/test/cases/finder_test.rbの修正です。

flakyなtest_find_with_a_multiple_sets_of_composite_primary_key_wrapped_in_an_array_orderedテストを修正しています。


Fix the open example in the Active Storage guide [ci skip]

rails guideのActive Storage Overviewの修正です。

openメソッドのexampleコードが正しく動作しないコードになっていたのを修正しています。

rails commit log流し読み(2026/11/28)

2026/11/28分のコミットです。

CHANGELOGにのったコミットは以下の通りです。

actionmailer/CHANGELOG.md

activerecord/CHANGELOG.md

railties/CHANGELOG.md

activesupport/CHANGELOG.md


Let the Action Mailer test helper load without Active Job

Action Mailer、Active Jobの修正です。

ActionMailer::TestCaseや同期的なメール送信をActive Jobに依存せず使用出来るよう修正しています。


Rename default_order to fallback_order

Active Recordの修正です。

Add support for implicit order in scopesで追加されたdefault_orderをfallback_orderにリネームしています。この機能の影響でmodelでdefault_orderという名前のscopeを定義出来なくなってしまっていたため。


Merge pull request #60003 from yahonda/fix-server-test-restart-mtime-race

railties/test/application/server_test.rbの修正です。

flakyになっていたtest_restart_rails_server_with_custom_pid_file_pathを修正しています。


Merge pull request #59916 from jonasporto/docs-skip-action-conditions

actionpack/lib/abstract_controller/callbacks.rbのdocの修正です。

callbackのdoc内の:only/:exceptと:if/:unless`を併用した場合の挙動の説明が誤った内容になっていたのを修正しています。


Ignore a schema cache dump that can't be deserialized

activerecord/lib/active_record/connection_adapters/schema_cache.rbの修正です。

存在しなくなったクラスを参照していたり等、何らかの問題でdeserialize出来ないschema cacheのdumpを読み込むとエラーになっていたのを、warningを出した上でdumpを無視し、データベースからschemaを読み込むよう修正しています。


Merge pull request #59953 from MIbtehajNasar/fix-59951-job-error-report-context

activejob/lib/active_job/execution.rbの修正です。

rescue_fromやretry_onなどでjobのエラーを処理中に報告されたエラーのcontextにjobが含まれていなかったのを、含まれるよう修正しています。


Merge pull request #59847 from czj/action-cable-test-server-broadcast

actioncable/lib/action_cable/connection/test_case.rbの修正です。

channelのテストでconnection.broadcastを呼ぶとエラーになっていたのを修正しています。


Merge pull request #59807 from yshmarov/fix-instant-lock-docs

docの修正です。

docでMySQLではエラーになるalgorithm: :instantとlock: :noneの組み合わせを使用していたのを修正しています。


Merge pull request #59738 from carlosdanielpohlod/action-view-helper-examples

docの修正です。

datetime_field、picture_tag、video_tagのdoc内のexampleコードで、出力結果が実際の出力と異なっていたのを修正しています。


Merge pull request #58935 from bastin27/fix-actionview-helper-doc-examples

docの修正です。

asset_path、number_to_currency、mail_to、sms_toなどのdoc内のexampleコードで、出力結果が実際の出力と異なっていたのを修正しています。


Build attribute Hashes without copying the lazy row

activemodel/lib/active_model/attribute_set.rbの修正です。

attributes_for_database、attributes_before_type_castで、呼び出しの度に全attributeを一時objectにコピーしてからhashにしていたのを、直接hashを生成するよう修正しています。


Add bin/rails credentials:keys to list credentials without their values

railtiesの修正です。

credentialsのキーを値なしで一覧表示するbin/rails credentials:keysコマンドを追加しています。キーはcredentials:fetchと同じドット区切りの形式で1行ずつ出力されます。


Merge pull request #59518 from sampokuokkanen/query-attribute-memoize-hash

activerecord/lib/active_record/relation/query_attribute.rbの修正です。

QueryAttribute#hashの値をメモ化するよう修正しています。


Merge pull request #59432 from wtn/buffer

activesupport/lib/active_support/core_ext/string/output_safety.rbの修正です。

gsub!などでunsafeになったSafeBufferでencode、-@、dedup、+@を使用すると、結果がhtml_safe?になりエスケープされずに出力されてしまうバグがあったのを修正しています。


Merge pull request #59498 from amatsuda/fix-activemodel-inline-rbs

activemodel/lib/active_model/errors.rbのdocの修正です。

ActiveModel::ErrorsのRBSのsignatureについて、パース出来ないものや誤った内容があったのを修正しています。


Clear default_order when calling reorder

activerecord/lib/active_record/relation/query_methods.rb、 activerecord/lib/active_record/relation/merger.rbの修正です。

reorderでfallback_orderもクリアするよう修正しています。


Merge pull request #59369 from amatsuda/symbol-to-s-returns-name

Active Supportの修正です。

Ruby 4.1より前のバージョンで、Symbol#to_sがRuby 4.1と同様にSymbol#nameを返すよう修正しています。合わせて、この対応により不要になったsymbolの場合は#nameを使用する、というような処理を#to_sを使用するよう修正しています。


Fix the status code for :unprocessable_content in the Layouts and Rendering guide [ci skip]

rails guideのLayouts and Rendering in Railsの修正です。

unprocessable_contentのstatus codeが誤っていたのを修正しています。


Fix the return type annotation of SchemaContext#build_default_attributes

activerecord/lib/active_record/model_schema/schema_context.rbのdocの修正です。

SchemaContext#build_default_attributesのdoc内のRBSのsignatureに誤りがあったのを修正しています。


Remove Rack::Sendfile from the default middleware stacks in the guides [ci skip]

rails guideの修正です。

デフォルトのstackについて説明している箇所からRack::Sendfileを削除しています。


Use a class name in the wrapper_exceptions example in the configuring guide [ci skip]

rails guideのConfiguring Rails Applicationsの修正です。wrapper_exceptionsを設定するexampleコードが正しく動作しないコードになっていたのを修正しています。


Merge pull request #60040 from 55728/fix-action-view-overview-nested-layout-yield

rails guideのAction View Overviewの修正です。

nested layoutを使用するexampleコード内のタイポを修正しています。


Merge pull request #60039 from 55728/fix-mysql-remove-column-algorithm-and-lock

activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rbの修正です。

MySQL adapterのremove_columnでalgorithmとlockオプションが無視されていたのを修正しています。


Merge pull request #60038 from 55728/fix-credentials-keys-invalid-key-length

railties/lib/rails/commands/credentials/credentials_command.rbの修正です。

credentials:keys commandでcredentialsの読み取りに失敗した場合等に適切なエラーメッセージが出力されるよう修正しています。


Merge pull request #60035 from 55728/fix-sanitize-sql-array-arel-sql-bind-variables

activerecord/lib/active_record/sanitization.rb、 activerecord/lib/active_record/querying.rbの修正です。

sanitize_sql_arrayやfind_by_sqlなどに、bind variableを含むArel.sqlのstatementを配列で渡すとActiveRecord::PreparedStatementInvalidになっていたのを修正しています。


Merge pull request #60034 from 55728/fix-follow-redirect-headers-mutation

actionpack/lib/action_dispatch/testing/integration.rbの修正です。

follow_redirect!が引数で渡されたheadersのHashにHTTP_REFERERを直接追加しており、frozenなhashが渡された場合にとFrozenErrorになっていたのを修正しています。


Merge pull request #60033 from 55728/fix-select-tag-prompt-option-mutation

actionview/lib/action_view/helpers/form_tag_helper.rbの修正です。

select_tagで引数で渡されたoptionsのhashを直接変更しないよう修正しています。


Find exclusion constraints by name alone when removing them

activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rbの修正です。

PostgreSQLでwhereを指定して追加したexclusion constraintが、remove_exclusion_constraintやマイグレーションのrollbackで削除できなかったのを修正しています。


Merge pull request #60032 from 55728/fix-http-cache-forever-last-modified-in-place

actionpack/lib/action_controller/metal/conditional_get.rbの修正です。

http_cache_foreverがlast_modifiedに渡されたTimeをUTCに変換していたのを、渡されたTimeは変更しないよう修正しています。


Merge pull request #60024 from thomasklemm/thomasklemm/association-load-one-connection-lookup

activerecord/lib/active_record/associations/association.rb、 activerecord/lib/active_record/reflection.rbの修正です。

Association#find_targetでstatement cacheの取得と実行を別々のwith_connectionブロックで行っていたのを、同じブロック&同じコネクションで処理を行うよう修正しています。

rails commit log流し読み(2026/11/27)

2026/11/27分のコミットです。

CHANGELOGにのったコミットは以下の通りです。

actionmailbox/CHANGELOG.md

actionpack/CHANGELOG.md

actionview/CHANGELOG.md

activesupport/CHANGELOG.md

actionmailer/CHANGELOG.md

railties/CHANGELOG.md

activerecord/CHANGELOG.md


Bound quoted name cache entries by byte size

activerecord/lib/active_record/connection_adapters/abstract/quoting.rbの修正です。

quoteしたカラム名、テーブル名のキャッシュについて、1KiBを超える名前はキャッシュしないよう修正しています。


Merge pull request #59962 from bruno-costanzo/fragment-cache-skip-unused-events

actionpack/lib/action_controller/log_subscriber.rb、 activesupport/lib/active_support/event_reporter/log_subscriber.rbの修正です。

enable_fragment_cache_loggingやlog_warning_on_csrf_failureでログ出力が無効になっている場合はevent reporterのeventを生成しないよう修正しています。


Merge pull request #59950 from mattyr/action-mailbox-conductor-routes-local-only

actionmailbox/lib/action_mailbox/engine.rb、 actionmailbox/config/routes.rbの修正です。

Action Mailboxのconductor用のroutesを、development及びtest環境でのみ定義、及び、bin/rails routesの結果に表示しないよう修正しています。


Merge pull request #59975 from yatmsu/hide-generator-flags-from-rails-new-help

railties/lib/rails/generators/rails/app/app_generator.rbの修正です。

rails new --helpにgenerator用のオプションが表示されないよう修正しています。


Merge pull request #59964 from bruno-costanzo/nested-attributes-scalar-id-lookup

activerecord/lib/active_record/nested_attributes.rb、 activerecord/lib/active_record/key.rbの修正です。

accepts_nested_attributes_forでのrecordのid比較処理について、single columnのidの場合はarrayに変換せずに比較するよう修正しています。


Merge pull request #59936 from 55728/fix-dirty-in-place-modification-doc-example

activemodel/lib/active_model/dirty.rbのdocの修正です。

ActiveModel::Dirtyのdocmodificationの例で、実際の戻り値とdocに記載されている値が異なっている箇所gああったのを修正しています。


Merge pull request #59983 from thomasklemm/thomasklemm/lease-registry-lockless-hit

activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rbの修正です。

LeaseRegistry#leaseで不要な場合はmutexの取得処理を行わないよう修正しています。


Merge pull request #59972 from bruno-costanzo/nested-default-deep-dup

activemodel/lib/active_model/attribute.rbの修正です。

JSONカラムなどのデフォルトnestした値がrecord間で共有されてしまていたのを、共有されないよう修正しています。


Merge pull request #59958 from bruno-costanzo/dup-lock-version-dirty-tracker

activemodel/lib/active_model/dirty.rbの修正です。

optimistic lockingを使用しているrecordをdupすると、コピーしたrecordのlock_versionがnilになってしまうバグがあったのを修正しています。


Give Live actions the event reporter context and tags of their request

Action Pack、Active Supportの修正です。

ActionController::Liveのactionで、Rails.eventのcontextとtagsに別のリクエストの値が使われてしまうバグがあったのを修正しています。


Merge pull request #59919 from milkcocoa/fix-action-view-strict-locals-block

Action Viewの修正です。

strict localsのデフォルト値でsafe navigation operatorを使用した場合に、unused blockのwarningが出力されてしまうバグがあったのを修正しています。


Return a plain String when truncate_bytes cuts an html_safe string

activesupport/lib/active_support/core_ext/string/filters.rbの修正です。

html_safeな文字列に対してString#truncate_bytesを使用すると、markupがescapeされ指定したバイト数を超える場合があったのを、String#truncateと同様にescapeしていないStringを返すよう修正しています。


Merge pull request #59952 from bastin27/fix-mailer-deliver-callbacks-without-mail

actionmailer/lib/action_mailer/base.rb、 actionmailer/lib/action_mailer/message_delivery.rbの修正です。

mailerのactionでmailが呼ばれなかった場合も、before_deliver、around_deliver、after_deliver等のコールバックが実行されていたのを、実行しないよう修正しています。


Merge pull request #59913 from 55728/fix-strong-parameters-nested-attributes-expect-doc

actionpack/lib/action_controller/metal/strong_parameters.rbのdoc修正です。

ActionController::StrongParametersのdocのaccepts_nested_attributes_forを使用したexpectのexmpleコードが正しく動作しない内容になっていたのを修正しています。


Honor DATE_FORMATS overrides of built-in formats

Active Supportの修正です。

Time::DATE_FORMATSやDate::DATE_FORMATSで:shortなどの組み込みのフォーマットを上書きしても反映されバグがあったのを修正しています。


Merge pull request #59911 from 55728/fix-message-pack-missing-namespaced-class

activesupport/lib/active_support/message_pack/extensions.rbの修正です。

MessagePackでseriralizeしたcacheについて、namespace付きのクラスが存在しない場合にキャッシュミスとして扱うよう修正しています。


Merge pull request #59908 from 55728/fix-response-content-type-non-string-header

actionpack/lib/action_dispatch/http/response.rbの修正です。

Content-TypeヘッダーにMime::Typeなど文字列以外の値を設定した場合にエラーになってしまうバグがあったのを修正しています。


Merge pull request #59903 from yahonda/fix-connection-pool-fiber-test-isolation-level-race

activerecord/test/cases/connection_pool_test.rbの修正です。

ConnectionPoolFiberTestでisolation levelを変更したタイミングによって、他のpoolのコネクションがリークし、以降のテストが大幅に遅くなる場合があったのを修正しています。


Merge pull request #59902 from hachi8833/revert_link_to_jemalloc_performance_guide

rails guideのTuning Performance for Deploymentの修正です。

guide内のjemallocへのリンクをfacebook/jemallocからjemalloc/jemallocに戻しています。jemallocのリポジトリがアーカイブ解除され再びアクティブになったため。


Merge pull request #59900 from fuzzyrichie/class-attribute-code-generator

activesupport/lib/active_support/core_ext/class/attribute.rbの修正です。

class_attributeで定義するメソッドをclass_evalでコンパイルしていたのを、ActiveSupport::CodeGeneratorを使って同じ属性名のメソッドをクラス間で共有するよう修正しています。


Don't share the query cache state with the ActionController::Live thread

actionpack/lib/action_controller/metal/live.rb、 activerecord/lib/active_record/railtie.rbの修正です。

ActionController::Liveのstreaming用のthreadがrequestのquery cacheを引き継いでしまい、stream内で同じレコードを繰り返し読み込むと古い結果が返ってしまうバグがあったのを修正しています。


Fix #33980: Parse escaped quotes in Accept headers

actionpack/lib/action_dispatch/http/mime_type.rbの修正です。

Acceptヘッダーのクォートされたパラメータ内にエスケープされた文字が含まれる場合に正しくパースできないバグがあったのを修正しています。


Merge pull request #58842 from rails/rmf-connection_pool

Active Supportの修正です。

connection_poolの実装をActive Supportに取り込み、connection_pool gemを依存から削除しています。Active Supportの依存を減らすため、との事です。


Merge pull request #59959 from wintan1418/document-s3-public-uploads-via-acl-default

rails guideのConfiguring Rails Applicationsの修正です。

config.active_storage.s3_public_uploads_via_aclのデフォルト値の説明がtrueのみになっていたのを、config.load_defaultsのバージョンごとのデフォルト値を記載するよう修正しています。


Declare Prism dependencies in Action View and Railties

railties/railties.gemspecの修正です。

prism gemのdependencyを指定しています。Ruby 4.1でprismがbundled gemになり、依存が無いとLoadErrorになってしまう可能性があるため。


Merge pull request #59627 from thomasklemm/thomasklemm/restore-max-password-length

activemodel/lib/active_model/secure_password.rbの修正です。

MAX_PASSWORD_LENGTH_ALLOWEDをBCryptPassword配下からActiveModel::SecurePasswordにも戻しています。この定数を参照しているアプリケーションがエラーにならないようにするため。


Merge pull request #59735 from thomasklemm/thomasklemm/upgrade-guide-pg-fixture-locks

rails guideのUpgrading Ruby on Railsの修正です。

PostgreSQL 18.4以降ではfixtureのロード時により多くのロックを取得するようになり、並列テストでout of shared memoryエラーになる場合がある旨説明を追加しています。


Merge pull request #59800 from thomasklemm/thomasklemm/lazy-indexed-keys

activemodel/lib/active_model/attribute_set.rb、 activemodel/lib/active_model/attribute_set/builder.rbの修正です。

LazyIndexedAttributeSet#keysで呼び出しのたびに不要なarrayを生成していたのを修正しています。


Allocate less per field in text_field_tag and tag

actionview/lib/action_view/helpers/form_tag_helper.rb、 actionview/lib/action_view/helpers/tag_helper.rbの修正です。

text_field_tagやtagで不要な計算やオブジェクトの生成を行わないよう修正しています。


Merge pull request #59984 from thomasklemm/thomasklemm/upgrade-guide-sidekiq-8-0-3

rails guideのUpgrading Ruby on Railsの修正です。

8.2ではSidekiq 8.0.3以降が必要な旨と、Sidekiqを初期化前にrequireしておく必要がある旨説明を追加しています。


Merge pull request #59985 from thomasklemm/thomasklemm/upgrade-guide-sendfile-unset

rails guideのUpgrading Ruby on Railsの修正です。

x_sendfile_headerが未設定の場合はRack::Sendfileがミドルウェアに含まれなくなり、insert_before Rack::Sendfileなどが起動時にエラーになる旨説明を追加しています。


Merge pull request #59812 from thomasklemm/thomasklemm/fix-flaky-ci-tests

actionpack/test/dispatch/server_timing_test.rbの修正です。

ServerTimingTestでヘッダーの値をsleepの長さと固定の許容範囲で比較していたため負荷の高い環境でテストが失敗する場合があったのを修正していmす。


Merge pull request #59817 from thomasklemm/thomasklemm/fix-ractor-proxy-unpin

activerecord/lib/active_record/connection_adapters/ractor_connection_handler/proxy.rb、 activerecord/lib/active_record/connection_adapters/ractor_connection_handler/proxy_connection_pool.rbの修正です。

Ractorのconnection proxyでunpinした際にpoolのunpinが行われず、writing poolがpinされたままになってしまっていたのを修正しています。


Keep navigation helpers available through UrlHelper

actionview/lib/action_view/helpers/url_helper.rbの修正です。

link_toやbutton_toなどがNavigationHelperに移動された影響で、UrlHelperやFormHelperを直接includeしているクラスでこれらのメソッドが使えなくなっていたのを修正しています。


Note in the upgrade guide that Action Mailer no longer loads Active Job

rails guideのUpgrading Ruby on Railsの修正です。

Action MailerがActive Jobのrailtieをロードしなくなったため、active_job/railtieを明示的にrequireする必要がある旨説明を追加しています。


Merge pull request #59987 from thomasklemm/thomasklemm/mailer-delivery-job-without-active-job

railties/lib/rails/application/configuration.rbの修正です。

config.load_defaultsでconfig.action_mailer.delivery_jobの設定をしないよう修正しています。設定内容がもうAction Mailerでデフォルト値になっており設定が不要、かつ、Action Mailerのロード時にActive Jobもロードされてしまい、activejob gemなしでAction Mailerが使えない、という問題があったため。


Merge pull request #59569 from thomasklemm/thomasklemm/association-scope-lazy-alias-tracker

activerecord/lib/active_record/associations/association_scope.rb、 activerecord/lib/active_record/associations/disable_joins_association_scope.rbの修正です。

AssociationScope#scopeで、throughではない関連付けで使わないAliasTrackerを生成しないよう修正しています。


Merge pull request #59661 from thomasklemm/thomasklemm/parameter-parsers-register-in-place

actionpack/lib/action_dispatch/http/parameters.rb、 actionpack/lib/action_dispatch/railtie.rbの修正です。

ActionDispatch::Request.parameter_parsersがfreezeされた影響で起動時にparameter_parsers[:jsonapi]経由でにパーサーを登録するとFrozenErrorになっていたのを、ractorize!が呼ばれるまではパーサーを変更出来るよう修正しています。


Merge pull request #59824 from thomasklemm/thomasklemm/form-builder-field-names

actionview/lib/action_view/helpers/form_tag_helper.rb、 actionview/lib/action_view/helpers/tags/base.rbの修正です。

form builderのfieldのid、nameを生成する際に、変更が不要な場合はstringのコピーを行わないよう修正しています。


Don't compare owner conditions when joining an association without a scope

activerecord/lib/active_record/reflection.rbの修正です。

関連先のdefault scopeに範囲外の値の条件がある場合に、関連付けをjoinsするとエラーになってしまうバグがあったのを修正しています。


Skip merging a blank relation into a relation without conditions

activerecord/lib/active_record/relation/merger.rbの修正です。

条件のないrelationに空のrelationをmergeする場合にearly returnするよう修正しています。


Merge pull request #59832 from thomasklemm/thomasklemm/errors-messages-for-no-errors

activemodel/lib/active_model/errors.rbの修正です。

エラーがないmodelでerrors[attr]を呼んだ場合にearly returnして不要なオブジェクトを生成しないよう修正しています。


Let a temporary SQLite table or view hide a permanent one in the schema readers

activerecord/lib/active_record/connection_adapters/sqlite3/schema_statements.rbの修正です。

SQLiteで通常のtableと同名のtemporary tableがある場合に、schema取得時にcolumnやindexが重複して正しく結果が取得出来ないバグがあったのを修正しています。


Merge pull request #59976 from thomasklemm/thomasklemm/index-definition-adapter-readers-2

activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rbの修正です。

lengthsやtypeなどのIndexDefinitionのreaderがadapter固有のクラスに移動された影響で、それ以外のadapterそれらのメソッドを呼ぶとNoMethodErrorになってしまっていたのを修正しています。


Keep the UTC offset in Time#change for times with a zone object

activesupport/lib/active_support/core_ext/time/calculations.rbの修正です。

zoneオブジェクトを持つTimeで、DST終了時に繰り返される時間帯の値に対してTime#changeを呼ぶとTZInfo::AmbiguousTimeになったり、時間が1時間ずれたりしてしまうバグがあったのを修正しています


Fix the attribute_method_affix example in Active Model docs [ci skip]

activemodel/lib/active_model/attribute_methods.rbの修正です。

attribute_method_affixメソッドのdoc内のexampleコードで処理が不足している箇所があったのを修正しています。


Merge pull request #59884 from smyk-git/fix-sti-type-condition-in-join-scope

activerecord/lib/active_record/reflection.rbの修正です。

STIのsubclassへのassociationのscopeにinheritance columnの条件がある場合に、joinsやeager_loadでSTIのtypeの条件が失われてしまうバグがあったのを修正しています。


Don't freeze serialized column defaults

Active Model、Active Recordの修正です。

serializeされた型ではデフォルト値をfreezeしないよう修正しています。デフォルト値がfreezeされるとcoderによってはカラムのデフォルト値と異なる値になるという問題があったため。


Add missing Active Support core extension requires

Action Pack、Active Supportの修正です。

不足していたrequireを追加しています。


Note in the upgrade guide that default_url_options is frozen by default

rails guideのUpgrading Ruby on Railsの修正です。

default_url_optionsがデフォルトでfreezeされたHashになり、直接変更するとFrozenErrorになることと、及び、代わりの設定方法についての説明を追加しています。


Find SQLite tables by any ASCII case of their name in the schema readers

activerecord/lib/active_record/connection_adapters/sqlite3/schema_statements.rb、 activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rbの修正です。

SQLite3 adapterで、大文字を含むようなテーブルを作成した場合に、大文字小文字が異なってもテーブルやindexの取得が出来るよう修正しています。


Let Attachment.from_node pick attachables the bulk lookup didn't locate

actiontext/lib/action_text/content.rbの修正です。

ActionText::Attachment.from_nodeをoverrideして独自のattachableを返すようにしていた場合にそのoverrideが使われなくなってしまっていたのを修正しています。


Bump the minimum supported SQLite version to 3.37.0

activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rbの修正です。

SQLite3 adapterでサポートするSQLiteの最小バージョンを3.37.0に変更しています。Rails 8.0からpragma_table_listを使用しており、3.37未満だと正しく動作しないため。


Fix Time.now(in:) raising inside travel_to

activesupport/lib/active_support/testing/time_helpers.rbの修正です。

travel_to、travel、freeze_timeのブロック内でTime.now(in: "+09:00")のように引数を指定するとエラーになっていたのを修正していまうs.


Fix row_count and exception in sql.active_record for async queries

activerecord/lib/active_record/connection_adapters/query_intent.rbの修正です。

load_asyncなどのasync queryについて、sql.active_recordイベントのpayloadが正しく設定されてなかったのを修正しています。


Fix receive_inbound_email_from_fixture raising when given a status

actionmailbox/lib/action_mailbox/test_helper.rbの修正です。

receive_inbound_email_from_fixture、receive_inbound_email_from_sourceにstatusを指定するとArgumentErrorになっていたのを修正sています。


Fix bin/rails notes raising on invalid bytes in a Ruby file's comment

railties/lib/rails/source_annotation_extractor.rbの修正です。

Rubyファイルのコメントに不正なUTF-8のバイトが含まれていると、bin/rails notesがエラーになっていたのを修正しています。


Fix collection options with a Proc for both value_method and selected

actionview/lib/action_view/helpers/form_options_helper.rbの修正です。

options_from_collection_for_selectやcollection_selectで、value_methodとselectedの両方にProcを指定するとエラーになっていたのを修正しています。


Fix the error type examples in full_messages_for and messages_for docs [ci skip]

activemodel/lib/active_model/errors.rbの修正です。

ActiveModel::Errors#full_messages_for及び#messages_forのdocのexampleコードで、実際には発生しないエラーを使用していたのを修正しています。

rails commit log流し読み(2026/11/26)

2026/11/26分のコミットです。

CHANGELOGにのったコミットは以下の通りです。

actionpack/CHANGELOG.md

activesupport/CHANGELOG.md

railties/CHANGELOG.md

activejob/CHANGELOG.md

activerecord/CHANGELOG.md


Document redirect settings for metal controllers (#59977)

actionpack/lib/action_controller/metal.rbのdocの修正です。

ActionController::Metalのdoc内のredirectのexampleについて、action_on_open_redirectなどのリダイレクト関連の設定を追加&なぜその設定が必要かの説明を追加しています。


Match Rack::BadRequest errors in ActionDispatch::ParamError

actionpack/lib/action_dispatch/http/param_error.rbの修正です。

request parameterのパース中にRack::Multipart::BoundaryTooLongErrorなどのエラーが発生した場合に500エラーになっていたのを、400を返すよう修正しています。


Merge pull request #59971 from saddestmartian/action-text-ordered-list-linear-numbering

actiontext/lib/action_text/plain_text_conversion.rbの修正です。

長い番号付きリストを含むAction Textのrich textをplain textに変換する際、リスト項目の番号付けをlibxml側で行うよう修正しています。高速化のため。


Merge pull request #59925 from 55728/fix-ci-parallel-group-shared-step-title

activesupport/lib/active_support/continuous_integration/group.rbの修正です。

config/ci.rbのparallelなgroup内で同じタイトルのstepが同時に実行されるとエラーになってしまうバグがあったのを修正しています。


Rescue all Redis errors in RedisCacheStore failsafe

activesupport/lib/active_support/cache/redis_cache_store.rbの修正です。

Add compatibility layers for RedisClient::Pooled and RedisClient::Has…の修正により、RedisCacheStoreでRedisのメモリ不足や認証エラーなど接続エラー以外のエラーが発生した場合に例外がそのままraiseしていたのを、以前と同様にエラーをrescueしてキャッシュミスとして扱うよう修正しています。


Merge pull request #59960 from wintan1418/fix-datetime-type-docs

activemodel/lib/active_model/type/date_time.rbのdocの修正です。

ActiveModel::Type::DateTimeのdocの例で、hourとzoneの値が実際の値と異なっていたのを、正しい値に修正しています。


Merge pull request #59956 from bruno-costanzo/eager-load-outer-join-aliases

activerecord/lib/active_record/relation/query_methods.rbの修正です。

同じテーブルに対してleft_joinsとeager_loadを併用した場合に、where(users: ...)などでテーブル名を指定した条件がeager_loadの方のテーブルに適用されるようになっていたのを、Rails 8.1と同様にleft_joinsの方にaliasなしのテーブル名を使うよう修正しています。


Check the encrypted file key length when decrypting

Active Support、railtiesの修正です。

ActiveSupport::EncryptedFileで長さが正しくないキーでも読み込み出来てしまっていたのを、読み込み時にもInvalidKeyLengthErrorをraiseするよう修正しています。合わせて、credentials:editやencrypted:editなどのコマンドでキーの長さが正しくない場合に、エディタを開く前に適切なエラーを表示するよう修正しています。


Merge pull request #59906 from 55728/fix-order-sql-literal-ordering-references

activerecord/lib/active_record/relation/query_methods.rbの修正です。

order(Arel.sql("...").desc)のようにSQLリテラルを指定して並び替えた場合に、includesがpreloadではなくJOINでロードされるようになっていたのを、Rails 8.1と同様の挙動になるよう修正しています。


Fix preloading ordered has_many :through scoped on its through table

activerecord/lib/active_record/associations/preloader/through_association.rbの修正です。

through先のテーブルへの条件を含むscopeを持つhas_many :throughをpreloadした場合に、scopeが正しくエラーになったりしてしまうバグがあったのを修正しています。


Merge pull request #59961 from bruno-costanzo/active-job-locate-records-in-bulk

activejob/lib/active_job/arguments.rbの修正です。

MyJob.perform_later(users)のようにrecordのarrayをjobに渡した場合に、job実行時にレコード毎にクエリが実行されていたのを、model毎に1回のクエリでロードするよう修正しています。


Keep readonly when preloading a filtered through

activerecord/lib/active_record/associations/preloader/through_association.rbの修正です。

conditionが指定されたreadonlyなhas_many :throughをpreloadした場合に、readonlyではないレコードが返されてしまうバグがあったのを修正しています。


Apply the rest of the scope of a disable_joins association

activerecord/lib/active_record/associations/disable_joins_association_scope.rbの修正です。

disable_joinsを指定したassociationをlazy loadした場合に、スコープの条件と並び順以外のselect、limit、includes、readonly、strict_loadingなどが無視されてしまうバグがあったのを修正をしています。


Add enforced option to add_check_constraint on PostgreSQL 18+

Active Recordの修正です。

PostgreSQL 18以降でadd_check_constraintにenforcedオプションを指定出来るよう修正しています。enforced: falseを指定すると制約がNOT ENFORCEDで作成され、レコードの挿入・更新時にチェックされなくなります。


Add change_check_constraint for PostgreSQL 19+

Active Recordの修正です。

PostgreSQL 19以降で、既存のcheck constraintをENFORCEDとNOT ENFORCEDの間で切り替えるためのchange_check_constraintメソッドを追加しています。ENFORCEDに変更すると、既存の全行がチェックされるようになっています。


Fix the :content_type description in register_encoder docs [ci skip]

actionpack/lib/action_dispatch/testing/integration.rbのdocの修正です。

register_encoderメソッドのdoc内のcontent_typeオプションについての説明内のタイポを修正しています。G


Don't run a query when checking or compatibility

activerecord/lib/active_record/relation/query_methods.rbの修正です。

fromにassociation relationを指定したrelationでRelation#orを使用した場合に不要なクエリが実行されないよう修正しています。

rails commit log流し読み(2026/11/25)

2026/11/25分のコミットです。

CHANGELOGにのったコミットは以下の通りです。

railties/CHANGELOG.md

activerecord/CHANGELOG.md

actiontext/CHANGELOG.md


Let MessageEncryptor subclasses inherit use_authenticated_message_encryption

activesupport/lib/active_support/message_encryptor.rbの修正です。

MessageEncryptorのsubclassでuse_authenticated_message_encryptionの値が継承されるよう修正しています。


Move column layout information to the model

activerecord/lib/active_record/model_schema.rb、 activerecord/lib/active_record/model_schema/schema_context.rbの修正です。

column nameとslotの対応情報をschema contextではなくmodel側で保持するよう修正しています。複数のschema contextでmodelのorderが異なる場合に対応出来るようにするため。


Remove unnecessary build packages

railties/lib/rails/generators/app_base.rb、 railties/lib/rails/generators/rails/db/system/change/change_generator.rbの修正です。

rails newで作成されるDockerfileでgemのビルド用にインストールするパッケージを、build-essentialからgcc、g++、makeに変更しています。不要なパッケージをインストールしないようにするため。


Merge pull request #59963 from bruno-costanzo/attribute-set-to-hash-single-pass

activemodel/lib/active_model/attribute_set.rb、 activemodel/lib/active_model/indexed_row.rbの修正です。

AttributeSet#to_hashと#keysでattributeごとに複数回のlookupを行っていたのを1回の走査で値を構築するよう修正しています。


Merge pull request #59433 from carlosdanielpohlod/document-validation-callback-options

activemodel/lib/active_model/validations/callbacks.rbのdocの修正です。

before_validationとafter_validationのdocに、指定可能なオプション(:on、:except_on、:if、:unless等)の説明を追加しています。


Merge pull request #59127 from bastin27/docs-length-validator-combined-options

docの修正です。

length validatorのオプションの組み合わせ方と、numericality validatorの:only_numericオプションの挙動について、実際の挙動と異なる説明が記載されていたのを修正しています。


Merge pull request #59128 from bastin27/test-length-validator-combined-options

activemodel/test/cases/validations/length_validation_test.rbの修正です。

validates_length_ofで:isと:minimumを組み合わせた場合や、:withinと:minimum/:maximumを同時に指定した場合のテストを追加しています。


Merge pull request #59970 from rafaelfranca/rafaelfranca/db-system-change-fixes

railties/lib/rails/generators/rails/db/system/change/change_generator.rbの修正です。

db:system:changeでDockerfile内のgem build用のpackagesを更新出来るよう修正しています。


Merge pull request #59918 from yahonda/check-constraint-lookup-by-name

activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb、 activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rbの修正です。

validate: falseで追加したcheck constraintをvalidate後に、add_check_constraint ..., validate: false, if_not_exists: trueで再度追加しようとしたり、remove_check_constraint ..., validate: falseで削除したりしようとするとエラーになってしまうバグがあったのを修正しています。


Deprecate a positional table name in Arel::Table.new

activerecord/lib/arel/table.rbの修正です。

Refactor Arel::Table to use keyword name: argumentで削除されたArel::Table.newのpositional引数のサポートを再度使用出来るようにし、positional引数が指定されたらdeprecatedメッセージを出力するよう修正しています。Arelはprivate APIなのでdeprecatedなしで削除されましたが、この挙動に依存しているgemが多数あったため、まずはdeprecatedという事になりました。


Limit the size of the quoted name caches

Active Recordの修正です。

quote_column_nameとquote_table_nameがquoteした名前をすべてキャッシュしていたのを、キャッシュが1000件に達したら新しい名前はキャッシュしないよう修正しています。


Merge pull request #58173 from lylo/action-text-batch-attachable-resolution

Action Textの修正です。

ActionText::ContentがattachmentごとにSGIDを個別のクエリで取得しいたのをギャラリーのattachmentも含めてモデルクラスごとに1回のクエリでまとめて取得し、contentインスタンスごとにキャッシュするよう修正しています。

rails commit log流し読み(2026/11/24)

2026/11/24分のコミットです。

CHANGELOGへの追加はありませんでした。


Merge pull request #49513 from seanpdoyle/action-dispatch-test-response-docs

docの修正です。

ActionDispatch::IntegrationTest#register_encoderメソッドにdocを追加、及び、rails guidenのTesting Rails ApplicationsにJSON Requestsのテストをする方法についての説明を追加しています。


Do not reload the schema in test_disable_enable_hstore

activerecord/test/cases/adapters/postgresql/hstore_test.rbの修正です。

test_disable_enable_hstoreがflakyになっていたのを修正しています。


Merge pull request #59946 from wintan1418/require-string-filters-in-active-model-error

activemodel/lib/active_model/error.rbの修正です。

不足していたrequireを追加しています。


Merge pull request #59947 from wintan1418/fix-relative-time-in-words-docs

actionview/lib/action_view/helpers/date_helper.rbのdocの修正です。

relative_time_in_wordsメソッドのdoc内、include_secondsを指定した場合のexampleコードの実行結果が実際の結果と異なっていたのを修正しています。

rails commit log流し読み(2026/11/23)

2026/11/23分のコミットです。

CHANGELOGにのったコミットは以下の通りです。

activerecord/CHANGELOG.md


Merge pull request #59920 from yahonda/remove-foreign-key-lookup-without-state

activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rbの修正です。

remove_foreign_keyで削除対象の外部キーを探す際にvalidateとenforcedオプションを無視するよう修正しています。validate: falseで追加後にvalidate済みの外部キーに対してremove_foreign_key.., validate: falseを実行するとArgumentErrorになってしまう、という問題があったため。


Merge pull request #59910 from 55728/fix-message-expires-at-in-place-utc

activesupport/lib/active_support/messages/metadata.rbの修正です。

MessageVerifier#generateやMessageEncryptor#encrypt_and_signで、引数のexpires_atに指定されたTimeを変更しないよう修正しています。


Merge pull request #58389 from taketo1113/update-node-lts-24

railties/lib/rails/generators/app_base.rbの修正です。

rails newで新規にアプリケーションを生成した際の.node-versionファイルのバージョンを26.13.1に更新しています。


Avoid redefinition warnings for inherited Proc layouts

actionview/lib/action_view/layouts.rbの修正です。

Procのlayoutを継承したcontrollecrのsubclassで独自のProcのlayoutを指定した場合に、_layout_from_procの再定義warningが出ていたのを修正しています。


Merge pull request #59901 from fuzzyrichie/relation-methods-code-generator

activerecord/lib/active_record/relation/delegation.rbの修正です。

GeneratedRelationMethodsでrelationからmodelへdelegateするメソッドをmodel毎にコンパイルしていたのを、ActiveSupport::CodeGeneratorを使用して同じ名前のメソッドのコードをmodel間で共有するよう修正しています。


Use utf8mb3 for the MySQL key_tests test table

activerecord/test/schema/mysql_specific_schema.rbの修正です。

MariaDB 13.1.1でutf8がutf8mb4になった影響で、テスト用テーブルのindexにprefixが付いてテストが失敗していたため、テーブルの文字セットにutf8mb3を明示するよう修正しています。


Merge pull request #59935 from hamajyotan/remove-dirty-from-normalization

activemodel/lib/active_model/attributes/normalization.rbの修正です。

使用していないActiveModel::Dirtyのincludeを削除しています。


Merge pull request #59933 from 55728/fix-integer-shard-connected-to-and-shard-selector

activerecord/lib/active_record/connection_handling.rb、 activerecord/lib/active_record/middleware/shard_selector.rbの修正です。

shardにintegerを指定した場合に、connected_to?とShardSelector middlewareでとNoMethodErrorになっていたのを修正しています。


Fix destroy_async with an ordered has_many scope

activerecord/lib/active_record/associations/has_many_association.rbの修正です。

order付きのscope + dependent: :destroy_asyncが指定されたhas_manyで、error_on_ignored_orderが有効な場合にrecordをdestroyするとArgumentErrorになってしまうバグがあったのを修正しています。


Merge pull request #56921 from ayushn21/ayush/add-guides-clean-task

rails guideのRuby on Rails Guides Guidelinesの修正です。

doc生成用のコマンドを実行した場合の挙動の説明が現在の挙動と一致していない箇所があったのを修正しています。


Merge pull request #59932 from 55728/fix-parameters-select-bang-return-value-doc

actionpack/lib/action_controller/metal/strong_parameters.rbのdocの修正です。

ActionController::Parameters#select!のdoc内の値が変わらなかった場合の戻り値についての説明が実際の挙動と一致していなかったのを修正しています。