なるようになるブログ

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

rails commit log流し読み(2023/09/04)

2023/09/04分のコミットです。

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

activerecord/CHANGELOG.md


Merge pull request #49117 from akhilgkrishnan/general-async-release-note

rails guideのRuby on Rails 7.1 Release Notesの修正です。

Active Record API for general async queriesの項に説明を追加しています。


Merge pull request #49123 from skipkayhil/hm-followup-49090

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

不要な$globalの指定が残っていたのを削除しています。


[skip ci] Remove webpacker guide reference

rails guideのThe Asset Pipelineの修正です。

Removes Webpacker from the guides index page で削除されたWebpacker guideへのリンクを削除しています。


Add original author's credit for #49100 [ci-skip]

activerecord/CHANGELOG.mdの修正です。

enumsにvalidateオプションを指定出来るようにした、Make enums validatable without raising errorの対応のauthorに、この対応の元の対応(Propose a way to add validation on the enum attribute)を行った方の名前を追加しています。


Simplify explanation by removing docs for classic mode

rails guideのGetting Started with Enginesの修正です。

現在は使用出来ないclassic loaderに関する説明を削除しています。


Merge pull request #45498 from HParker/deprecate-rewhere-on-merge

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

rewheremergeオプションを指定した場合の挙動をdeprecatedにしています。Rails 7.0からより詳細なconditionの指定が出来るようになっており(Support merging option :rewhere to allow mergee side condition to be replaced exactly)、オプションを指定しての古い挙動はサポートする必要が無くなった為。


Lock globalid gem version to address broken CI

Gemfileの修正です。

globalid gemのバージョンを1.2.0未満に固定しています。1.2.0以上だとRailsのCIがコケてしまう為。


Merge pull request #48095 from ippachi/triple-dot-range-unscope

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

whereにtripe dot rangeを指定した場合に、そのwhereに対するunscopeが正しく動作しないバグがあったのを修正しています。

# Before

Post.where(id: 1...3).unscope(where: :id).to_sql # "SELECT `posts`.* FROM `posts` WHERE `posts`.`id` >= 1 AND `posts`.`id` < 3"
# After

Post.where(id: 1...3).unscope(where: :id).to_sql # "SELECT `posts`.* FROM `posts`"