なるようになるブログ

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

rails commit log流し読み(2023/12/12)

2023/12/12分のコミットです。

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

activerecord/CHANGELOG.md


Merge pull request #50319 from fatkodima/fix-where-for-polymorphic-cpk

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

composite primary keyを使用しているmodelをpolymorphic associationで参照している場合に、whereにそのmodelを指定した場合にエラーになってしまうバグがあったのを修正しています。


Merge pull request #49472 from mateusdeap/main

rails guideのRails Routing from the Outside Inの修正です。

Resource Routing: the Rails Defaultセクション内のグラマーの修正を行っています。


Merge pull request #49858 from skipkayhil/hm-dont-assign-internal-variables

Action Pack、Action Viewの修正です。

Action Viewの内部用の変数がActionView::Baseinstance_variablesから参照出来ないよう修正しています。


fix LocalCache#read_multi_entries not namespacing keys before looking them up in the cache

activesupport/lib/active_support/cache.rbactivesupport/lib/active_support/cache/strategy/local_cache.rbの修正です。

LocalCache#read_multi_entriesで、namespaceを使用している場合にkeyのnormalizeが行われなかったバグの修正、及び、raw valueが正しくdeserializeされないバグがあったのを修正しています。


Merge pull request #47306 from zzak/re-47129

actionpack/test/controller/routing_test.rbの修正です。

action_dispatch.route_uri_pattern headerの値を確認するテストを追加しています。


Merge pull request #50163 from EduardoGHdez/interval-overflow-protection

activerecord/lib/active_record/connection_adapters/postgresql/oid/interval.rbの修正です。

PostgreSQL adapterで、interval型のattributeに巨大な値が指定された場合に適切なフォーマットで値を扱えるようにするため、値のserialze時にActiveSupport::Durationに変換するよう修正しています。


refactor: fix typo

rails guideのThe Rails Command Lineの修正です。

bin/rails generateセクション内のタイポを修正しています。


Merge pull request #50281 from p8/activerecord/assert-queries

Active Recordの修正です。

Railsのテストで使用されていた、SQLが実行された/されなかったを確認するためのassertions(assert_queriesassert_no_queries)をpublic APIとして公開しています。


Document :request in start_processing's payload

rails guideの`Active Support Instrumentationの修正です。

start_processing.action_controller hookのpayloadに、:requestについての説明を追加しています。


Lock bigdecimal version to 3.1.4

activesupport/activesupport.gemspecの修正です。

bigdecimal gemのバージョンを3.1.4以下に固定しています。3.1.5だとCIでエラーになってしまうため。


Update outdated documentation for Engines

rails guideのGetting Started with Enginesの修正です。

Using a Class Provided by the Applicationセクションにあるgeneratorが生成するファイルの例が実際の結果と異なっていたのを修正しています。