なるようになるブログ

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

rails commit log流し読み(2025/08/25)

2025/08/25分のコミットです。

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

activerecord/CHANGELOG.md

actionpack/CHANGELOG.md


Add ActiveRecord::ExclusionViolation error class for exclusion constraint violations

activerecord/lib/active_record/connection_adapters/postgresql_adapter.rbactiverecord/lib/active_record/errors.rbの修正です。

PostgreSQLでexclusion constraint violationsが発生した場合にActiveRecord::StatementInvalidをraiseしていたのを、専用のエラークラス(ActiveRecord::ExclusionViolation)をraiseするよう修正しています。エラーの判別をしやすくする為。


Merge pull request #55541 from joshuay03/fix-55525

activestorage/lib/active_storage/service/s3_service.rbの修正です。

ActiveStorage::Service::S3ServiceでdeprecatedになったAws::S3::Object#upload_streamを使用していたのを、新しく追加されたAws::S3::TransferManager#upload_streamを使用するよう修正しています。

参考:S3 Transfer Manager


Merge pull request #55538 from Frexuz/patch-3

railties/lib/rails/templates/rails/welcome/index.html.erbの修正です。

Welcome pageにdark modeのサポートを追加しています。


Merge pull request #55543 from a5-stable/avoid-filter-attribute-for-base

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

ActiveRecord::Baseに対して、不要なattributeのfilterの設定を行わないよう修正しています。


Allow unsubscribing from events

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

error reporterのsubscriberを、unsubscribe出来るよう修正しています。

subscriber = MyEventSubscriber.new
Rails.event.subscribe(subscriber)
Rails.event.unsubscribe(subscriber)

Add headers to engine route inspection command

actionpack/lib/action_dispatch/routing/inspector.rbの修正です。

route inspection commandでengineのrouteを表示する際に、header(Prefix Verb URI Pattern Controller#Action)を入れるよう修正しています。


[ci skip]Fix a broken link to ActiveStorage::Blob#url in the documentation

activestorage/app/models/active_storage/variant.rbのdocの修正です。

ActiveStorage::Variant#urlメソッドのdoc内のActiveStorage::Blob#urlについて記載している箇所が、API docへのリンクになるよう修正しています。