なるようになるブログ

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

rails commit log流し読み(2023/05/22)

2023/05/22分のコミットです。

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

railties/CHANGELOG.md

activesupport/CHANGELOG.md

activerecord/CHANGELOG.md


Run after_bundle blocks with app:template command

railties/lib/rails/generators/rails/app/app_generator.rbrailties/lib/rails/tasks/framework.rakeの修正です。

app:templateコマンド実行時に、自動でbundle install及び、after_bundle callbackを実行するよう修正しています。


Avoid unnecessary allocations in picture_tag

actionview/lib/action_view/helpers/asset_tag_helper.rbの修正です。

picture_tagメソッドで不要なオブジェクト生成を減らすようリファクタリングしています。


Add missing comma [ci-skip]

actionpack/lib/action_dispatch/middleware/show_exceptions.rbのdocの修正です。

ActionDispatch::ShowExceptions classのdocのフォーマットを修正しています。


TrilogyAdapter: translate Trilogy::TimeoutError in AdapterTimeout

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

TrilogyAdapterでtimeoutが発生した場合に、エラーをActiveRecord::AdapterTimeoutでwrapするよう修正しています。他のadapterと挙動を合わせる為。


Merge pull request #48271 from piecehealth/fix_ar_conn_verify

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

checkout_and_verifyメソッド内でStandardErrorをrescueして後処理をしていたのを、Exceptionをrescueするよう修正しています。Rackの処理でtimeoutが発生した場合はExceptionの子クラスがraiseされるようになっており、それらのexceptionが発生した場合に後処理が行われるようにする為。


Link to ActionView::Helpers top level namespace for all helpers

rails guideのAction View Form Helpersの修正です。

イントロ部分にあるAPI docへのリンクをActionView::Helpers::FormHelperへのdocからActionView::Helpersのtopに変更しています。


ERB::Util.html_escape_once always returns an html_safe string

activesupport/lib/active_support/core_ext/erb/util.rbの修正です。

ERB::Util.html_escape_onceが必ずhtml_safeな文字列を返すよう修正しています。元々は、引数のStringhtml_safeな内容だった場合、Stringをそのまま返していたのですが、それだと、

<p><%= html_escape_once("this & that &amp; the other") %></p>

のような使いかたをした場合に、escape処理が二重に発生してしまう、という問題があった為、必ずhtml_safeな文字列を返すよう修正しています。


Fix change_in_place? for binary serialized columns

Active Record、Active Modelの修正です。

binary columnにserialized attributeを保持するようにしていた場合に、値の変更検知が正しく行えてなかったのを修正しています。


Remove redundant test

actionmailer/test/message_delivery_test.rbの修正です。

Active Jobに正しくメールがenqueされている事を確認するテストを削除しています。他のテストで同じ確認が出来ている為。


Docs: Fix queue_as doc wording [ci skip]

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

queue_asメソッドのdocの言い回しを修正しています。