なるようになるブログ

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

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

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

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

activerecord/CHANGELOG.md


Default db_config should be primary or first

activerecord/lib/active_record/database_configurations.rbactiverecord/lib/active_record/tasks/database_tasks.rbの修正です。

primaryという名前の設定があればそれを、無ければ最初に定義されているconfigをDBのdefaultのconfigとして扱うよう、各箇所で処理を統一するよう修正しています。


Merge pull request #40129 from alan-pie/claify-exists-documentation

rails guideのActive Record Associationsの修正です。

各種collectionメソッドの説明に、メソッドはcollectionのtableに対して処理を行う旨説明を追加しています。


Merge pull request #40159 from hahmed/fix-reference-to-rails-command-without-bin

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

credentialsが見つからなかった場合のエラーメッセージ内のrails -> bin/railsに修正しています。


Avoid setting ActiveRecord::Base.configurations twice in db rake tasks.

activerecord/lib/active_record/railtie.rbactiverecord/lib/active_record/railties/databases.rakeの修正です。

rake task実行時にActiveRecord::Base.configurationsが複数回設定されてしまっていたのを、一度だけ設定されるよう修正しています。


Raise error when from is used with delete_all.

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

delete_allfromをセットで使用した場合に、fromが無視されていたのを、エラーとなるよう修正しています。


Merge pull request #40101 from tgxworld/fix_not_disconnecting_pool

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

migrationでadvisory lock用のconnectionを取得した後に、後処理でそのconnectionをdisconectするよう修正しています。sessionが残ったままになってしまうのを避ける為。