なるようになるブログ

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

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

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

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


Fix #39205 ReadOnlyError when on writing connection

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

fixturesでconnection poolの設定をする際に、データwrite用のconnection handelrが正しく指定されないバグがあったのを修正しています。


Move and update enlist_fixture_connections test

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

enlist_fixture_connectionsに関するテストが異なるテストクラスに定義されていたのを、1つのクラスにまとめるよう修正しています。


Improve performance for loaded association's first

activerecord/lib/active_record/associations/collection_proxy.rbactiverecord/lib/active_record/relation/finder_methods.rbの修正です。

associationがロード済みの場合、遅いscope valueへのdeleate処理を行わないようにしてfirstの性能を改善しています。


Only run on SQlite3

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

SQLite3に依存したテストを、SQLite3Adapterでのみ実行するよう修正しています。


Remove Indexer class from Rails Guide generator

使用していないguides/rails_guides/indexer.rbを削除しています。


Casting aggregated value takes attribute type precedence over database type

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

全てのaggregated valuesがattribute typeでcast処理が行われるよう修正しています。


Merge pull request #39264 from kamipo/fix_type_cast_pluck

Active Recordの修正です。

pluckの戻り値が正しくtype castされるよう修正しています。


Merge pull request #39268 from kamipo/fix_merging_multiple_left_joins

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

異なるassociationのleft joinsを複数mergeした場合に、指定したとおりの順にmergeされないバグがあったのを修正しています。


fix wording in rail/engine class

railties/lib/rails/engine.rbのdocの修正です。

Rails::Engineクラスのdoc内の言い回しを修正しています。


Exercise test kwargs for scope name containing space

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

scope名に空白がある + 引数にキーワード引数を指定した場合のテストを追加しています。


Update supports_rename_index? version for MariaDB

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

supports_rename_index?メソッドがMariaDBの場合必ずfalseを返していたのを、v10.5.2以上の場合、trueを返すよう修正しています。v10.5.2でRENAME INDEXのサポートが入った為。


Fix unintentional method redefinitions

activestorage/app/models/active_storage/variant.rbの修正です。

proxy対応の際に不要なメソッドの再定義処理が入ってしまっていたのを削除しています。