なるようになるブログ

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

rails commit log流し読み(2023/01/24)

2023/01/24分のコミットです。

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

actiontext/CHANGELOG.md

activesupport/CHANGELOG.md

actionmailer/CHANGELOG.md

activerecord/CHANGELOG.md


Update Action Text's Trix dependency

Action Textの修正です。

bundleしているTrixのバージョンを2.0.4に更新しています。


Make raise_on_missing_translations raise on any missing translation

activesupport/lib/active_support/i18n_railtie.rbの修正です。

config.i18n.raise_on_missing_translationsの設定がcontrollerとviewでしか有効化されてなかったのを、I18n.tを使用している全てのコードで有効化されるよう修正しています。


Allow trix content

codespell.txtの修正です。

Trixで使用している単語を追加しています。


Merge pull request #47101 from seanpdoyle/action-mailer-params-default

actionmailer/lib/action_mailer/parameterized.rbの修正です。

ActionMailer::Parameterized#paramsのデフォルト値をnilから空のHashに変更しています。ActionMailer::Parameterized.withによるparamsへの処理より前に参照されてもエラーにならないようにする為。


Fix SQLWarning + exec_delete and exec_update tests

activerecord/test/cases/adapters/mysql2/mysql2_adapter_test.rbの修正です。

SQLWarningに関するテストが実行されるSQLによってfailしてしまうようになっていたのを修正しています。


use lower case for codespell ignore words

codespell.txtの修正です。

codespellのignore wordsに小文字を使用するよう修正しています。小文字でないと認識してくれない為。


Revert "Address test_warnings_do_not_change_returned_value_of_exec_(update|delete) failures"

不安定だったtest_warnings_do_not_change_returned_value_of_exec_(update|delete)を安定するよう修正した、Address test_warnings_do_not_change_returned_value_of_exec_(update|delete) failuresをRevertしています。Fix SQLWarning + exec_delete and exec_update testsで根本対応が行われた為。


Don't reset view_paths in Rails::ApplicationController

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

Rails::ApplicationControllerでview pathの設定をする際、既存の設定を上書きしていたのを、prepend_view_pathを使って追加するよう修正しています。Action Textで設定されたview pahがmailer previewを確認する際に使用出来るようにする為。


ActiveRecord::Relation#explain accepts options

Active Recordの修正です。

ActiveRecord::Relation#explainexplain statement実行時に使用するオプションを指定出来るよう修正しています。

Customer.where(id: 1).joins(:orders).explain(:analyze, :verbose)
# => EXPLAIN (ANALYZE, VERBOSE) SELECT "shop_accounts".* FROM "shop_accounts" INNER JOIN "customers" ON "customers"."id" = "shop_accounts"."customer_id" WHERE "shop_accounts"."id" = $1 [["id", 1]]