なるようになるブログ

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

rails commit log流し読み(2020/05/02)

2020/05/02分のコミットです。

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

activerecord/CHANGELOG.md

activemodel/CHANGELOG.md


Add back the support to pass at as a proc in the job assertions

activejob/lib/active_job/test_helper.rbの修正です。

job assertionsのat引数にProcオブジェクトを渡せるよう修正しています。


Add test for slug to ID with ID is out of range

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

whereの引数のidにslug + 範囲外の値を指定した場合のテストを追加しています。


Support query attrs and bind params in dot output

activerecord/lib/arel/visitors/dot.rbの修正です。

dot出力でquery attrsとbind paramsをサポートするよう修正しています。


Merge pull request #39108 from kamipo/lock_benchmarck-ips_version

benchmark-ipsのバージョンを2.8.0未満にロックしています。2.8.0だと必要なファイルがgemに含まれておらず、使用時にエラー(LoadError)になってしまう為。


Support limit(n) and offset(n) nodes in dot output

activerecord/lib/arel/visitors/dot.rbの修正です。

dot出力でlimit(n)offset(n) nodeをサポートするよう修正しています。


Deprecate passing a column to type_cast

Active Recordの修正です。

type_castにcolumnを渡すのがdeprecateになりました。

type castに必要な型情報はtype objectから完全に分離されており、type_castにcolumnを渡して処理を行う事は通常不要な為。


Fix minimum and maximum on non numeric column

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

Fix aggregate functions to return numeric value consistently even on custom attribute typeでaggregation functionsの結果が必ずnumericになるようにしたのですが、minimummaximumに関してはそうでは無かった(引数にdateカラムを指定した場合、結果はdateになる事を期待していた)為、minimummaximumについては元の挙動になるよう修正しています。


Deprecate marshalling load from legacy attributes format

activemodel/lib/active_model/attribute_set/builder.rbの修正です。

PERF: Recover marshaling dump/load performanceでattribute hashをmarshallした際のフォーマットが変更になったのですが、その変更前の古いフォーマットでのloadのサポートがdeprecateになりました。


Depend on Zeitwerk 2.3

Zeitwerkのバージョン指定を~> 2.3に修正しています。