なるようになるブログ

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

rails commit log流し読み(2024/11/01)

2024/11/01分のコミットです。

CHANGELOGへの追加はありませんでした。


Revert "Merge pull request #53330 from Shopify/active-model-dirty-skip-reset"

ActiveModel::Dirty#initialize_dupでのoriginal valuesのreset処理を、元のrecordが保存済みの場合のみ行うよう修正してた、ActiveModel::Dirty: only reset original values for persisted recordsをRevertしています。原因は不明ですが、この対応の影響でSQLが余計に実行されてしまうことがあるようで、性能悪化の可能性があるので一旦Revertしたとのことです。


Use ActiveModel::Type::SerializeCastValue to casted value in InsertAll

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

InsertAllで値をserializeする際に、ActiveModel::Type::SerializeCastValueを使用するよう修正しています。不要なcast処理が実行されるのを避ける為。


Consolidate two if column_name == :all conditions

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

column_name:allかどうかのチェックを2箇所で行っていたのを、一つに処理をマージするよう修正しています。


Fix typos [ci-skip]

docの修正です。

各docやコメント内のタイポを修正しています。


Fix order with using association name as an alias

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

orderにassociation nameをaliasとして指定した場合に、その値がSQLで使用されないバグがあったのを修正していmさう。


Fix non-deterministic order dependent failure

activerecord/test/cases/relation/with_test.rbの修正です。

test_with_when_invalid_argument_is_passedがテストの実行順によってはfailする内容になっていたのを修正しています。


Merge pull request #51508 from ioquatix/actiondispatch-response-body-to_ary

Action Pack、Action Viewの修正です。

ActionDispatch::Responseでresponseを組み立てる際に、bodyを内部的に必ずbufferしていたのを、bufferしないで良い値はbufferしないよう修正しています。ActionDispatch::Response::Bufferのstreamingの扱いを、Rack 3の仕様と合わせる為、のようです。