なるようになるブログ

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

rails commit log流し読み(2022/03/19)

2022/03/19分のコミットです。

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


Update all counters in reset_counters using a single query

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

reset_countersメソッドでcounter毎にqueryを実行していたのを、1つのqueryで全てのcounterのリセットを行うよう修正しています。


Merge pull request #44718 from ghousemohamed/extend-test-cases-for-object-in-activesupport

activesupport/test/core_ext/object/acts_like_test.rbの修正です。

acts_like?(:string)についてのテストを追加しています。


Use duck_string instead of string

activesupport/test/core_ext/object/acts_like_test.rbの修正です。

先に追加されたacts_like?のテストで、テスト対象のオブジェクトが誤っていたのを修正しています。


Merge pull request #44608 from MGatner/problem-json

actionpack/lib/action_dispatch/http/mime_types.rbの修正です。

application/jsonのsubtypeとして、application/problem+jsonを追加しています。

参考: RFC 7807 - Problem Details for HTTP APIs