2026/06/02分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
activesupport/CHANGELOG.md
activerecord/CHANGELOG.md
- Fix PostgreSQL
daterange/tsrange/tstzrangeschema dump producing invalid Ruby. - Fix
findwith multiple composite primary key ids passed as strings silently returning[]. - Fix collection association
ids=writers (e.g.author.book_ids=) raisingActiveRecord::RecordNotFoundfor existing records when a composite primary key model is assigned string ids (the shape ids take from request params). - Fix
has_many/has_one :throughassociations withdisable_joins: truesilently returning an empty result when the source points to a composite primary key model.
actionview/CHANGELOG.md
- Fix
FormBuilder#to_partial_pathreturningnilfor subclasses whose name does not end inBuilder. - Fix
ActionView::TestCase#renderto resetrendered.
activestorage/CHANGELOG.md
Reimplement RedisCache store using redis-client
Active Supportの修正です。
ActiveSupport::Cache::RedisCacheStoreについて、redis gemではなく、redis-client gemを使用すようリファクタリングしています。ActiveSupport::Cache::RedisCacheStoreの接続にredisオプションを使用している場合は、まだ古い実装(DeprecatedRedisCacheStore)が使われるようになっています。が、これはdeprecatedになっており、今後は:urlや:clientオプションを使用して設定を行う必要があります。
Merge pull request #57439 from 55728/fix-range-schema-dump-syntax-error
activerecord/lib/active_record/connection_adapters/postgresql/oid/range.rbの修正です。
PostgreSQLのdaterange / tsrange / tstzrangeのデフォルトに[2024-01-01,2025-01-01)のようなRubyとしてvalidaな値を指定した場合に、schema.rbにMon, 01 Jan 2024...Wed, 01 Jan 2025とうフォーマットで出力されてしまい、結果この値が記載されたschema.rbをロード時にエラーになってしまう、というバグがあったのを修正しています。
Cast composite primary key ids component-wise in find
activerecord/lib/active_record/relation/finder_methods.rbの修正です。
Model.find([["1", "10"], ["1", "20"]])のように、findにcomposite primary idsを複数stringで渡した場合に、誤った結果が返ってくるバグがあったのを修正しています。
Cast composite primary key ids component-wise in collection ids= writers
activerecord/lib/active_record/associations/collection_association.rbの修正です。
composite primary keyを使用している場合に、collection associatinoのids writerにstring idsを指定するとエラーになってしまうバグがあったのを修正しています。
Fix FormBuilder#to_partial_path returning nil for non-Builder subclasses
actionview/lib/action_view/helpers/form_helper.rbの修正です。
ActionView::Helpers::FormBuilderのsubclass名がFormBuilderで終わっていない場合に、to_partial_pathがnilを返してしまうバグがあったのを修正しています。
Merge pull request #57403 from janko/image-processing-2.0
Acitve Storageの修正です。
image_processing gemの依存を2系に更新しています。
ActionView::TestCase#render resets rendered
actionview/lib/action_view/test_case.rbの修正です。
ActionView::TestCase#render実行後にrenderedの値がリセットされる旨ドキュメントに記載されているのに、実際にはリセットされずrenderが追加されつづけてしまうバグがあったのを修正しています。
Fix disable_joins through associations grouping by composite key
activerecord/lib/active_record/disable_joins_association_relation.rbの修正です。
has_many/has_one :throughにdisable_joins: trueオプションを指定している、かつ、souceにcomposite primary keyを使用しているmodelが指定されている場合に、該当のassociationが正しく取得出来ないバグがあったのを修正しています。