なるようになるブログ

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

rails commit log流し読み(2022/06/17)

2022/06/17分のコミットです。

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

activerecord/CHANGELOG.md


Remove the multi-call form of assert_called_with

assert_called_withargs引数にArrayを指定した場合に、それぞれ異なる引数としてmock.expectを呼びだす、という挙動をサポートしていたのを削除しています。キーワード引数に対するmock処理がこのやり方だと正しく動作しない為。


Add configurable deprecation warning for singular associations

Active Record、railtiesの修正です。

Deprecate plural association names on singular associationsで削除した、whereなどにassociation名をsingularを指定した場合の挙動を戻して、代わりにdeprecateメッセージが表示されるよう修正しています。


Add more detailed description to migration generator

railties/lib/rails/generators/rails/migration/USAGEの修正です。

migration generatorのUSAGEにより詳細な説明を追加しています。


add repo link for scaffold templates to docs and slightly rephrase docs

rails guideのCreating and Customizing Rails Generators & Templatesの修正です。

Customizing Your Workflow by Changing Generators Templatesの項に、scaffoldで生成されるデフォルトのtemplatesファイルのソースへのリンクを追加しています。


Merge pull request #44945 from fatkodima/optimize-batches

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

Active Recordのbatch処理で生成されるSQLを、WHERE IN (...ids...)からrange(WHERE id >= num1 AND id < num2)になるよう修正しています。WHERE INだと件数が多い場合(デフォルト1000)だと大変長いSQLになってしまい、logやモニタリングツールで正しく表示出来ない事がある為。


Specify that rails-dev-box will not work with any Apple silicon Mac

rails guideのContributing to Ruby on Railsの修正です。

rails-dev-boxはApple silicon Macでは動作しない旨説明を修正しています。