なるようになるブログ

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

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

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

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

railties/CHANGELOG.md

activerecord/CHANGELOG.md

activesupport/CHANGELOG.md


Check for protect_from_forgery in ActiveStorage::BaseController

activestorage/app/controllers/active_storage/base_controller.rbの修正です。

ActiveStorage::BaseControllerでCSRF対策を使用するかどうかのチェックが、Allow configuring Active Storage base controller parent classの対応以降、正しく動作していなかったのを修正しています。


Merge pull request #59692 from kehra/cursor/fix-increment-bang-stale-lock-version-da2f

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

optimistic lockを使用しているモデルでincrement!/decrement!を呼ぶ際、レコードのlock_versionが古いと、エラーにならずカウンターの更新が正しく行われないバグがあったのを修正しています。


Treat a MessagePack cache entry with a missing class as a cache miss

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

MessagePack serializerで、cacheに含まれるクラスが見つからないとnilがcacheされてしまっていたのを、ActiveSupport::Cache::DeserializationErrorをraiseしてcache missとして扱うよう修正しています。


Merge pull request #59779 from fuzzyrichie/app-update-detect-kamal

railties/lib/rails/commands/app/update_command.rbの修正です。

bin/rails app:updateでKamalを使用しているかどうかを検知し、Kamalを使用していない場合に必要な設定を維持するよう修正しています。


Merge pull request #59642 from thomasklemm/thomasklemm/where-empty-condition-binds

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

Group bound SQL literals in WhereClause like other SQL literals

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

where/havingにbindt value付きのSQL literalをArel nodとして渡すと括弧で囲まれず、SQLが期待通りの順序で処理されないバグがあったのを修正しています。


Load authors fixtures in StrictLoadingTest

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

不足していたfixtureのloadを追加しています。


Don't show the encryption key in EncryptedFile#inspect

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

ActiveSupport::EncryptedFile#inspectでencryption keyが表示されないよう終了しています。


Merge pull request #59771 from czj/rank-unranked-through-records-last

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

orderが指定されたhas_many :throughをpreloadする際、sourceがロード済みのhas_and_belongs_to_manyまたは:through associationで、その中に取得されていないレコードが含まれているとArgumentErrorが発生してしまうバグがあったのを修正しています。