以下の内容はhttps://y-yagi.hatenablog.com/entry/2025/10/18/045419より取得しました。


rails commit log流し読み(2025/10/17)

2025/10/17分のコミットです。

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

activestorage/CHANGELOG.md

activemodel/CHANGELOG.md

railties/CHANGELOG.md

activerecord/CHANGELOG.md

actionpack/CHANGELOG.md


Fix passing both module: and shallow: to resources

actionpack/lib/action_dispatch/routing/mapper.rbの修正です。

resourcesmoduleshallowオプション両方を指定した場合に、shallowオプションが無視されてしまうバグがあったのを修正しています。


[Getting Started Tutorial] Add note on default string type for email column for Subscriber and explain the resulting migration file

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

Adding Subscribers to Productsセクションに、migrationでcolumnに型を指定しない場合の挙動についての説明を追加、及び、subscriberを作成するmigrationのexampleを追加しています。


Add support for bound SQL literals in CTEs

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

ActiveRecord::QueryMethods#withにArelを使用して作成したSQL literalを指定した場合に、エラーになってしまうバグがあったのを修正しています。


Let Blob#open return a tempfile for manual unlinking

activestorage/lib/active_storage/downloader.rbの修正です。

ActiveStorage::Blob#openにblockを指定せずに使用した場合に、Tempfile.openと同様にopenしたファイルを返すよう修正しています。blockを渡せないような場合でも使用出来るようにする為。


Add error type support to messages_for and full_messages_for methods

activemodel/lib/active_model/errors.rbの修正です。

ActiveModel::Errors#messages_for及びActiveModel::Errors#full_messages_forにerror typeを指定出来るよう修正しています。

person = Person.create()
person.errors.full_messages_for(:name, :invalid)
# => ["Name is invalid"]

person.errors.messages_for(:name, :invalid)
# => ["is invalid"]

Add missing structured event data for logs

Structured Eventのpayloadに、項目が不足したり、誤った内容が設定されたりしている箇所があったのを修正しています。


Add environment config file existence check

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

railsのcommandなどを実行する際、存在しないenvironmentを指定された場合にただその指定を無視していたのを、exceptionをraiseするよう修正しています。


Merge pull request #55907 from ruyrocha/fix/sqlite3-data-loss

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

SQLite3で、ON DELETE CASCADE` foreign keysを持つ子テーブルから参照されているテーブルを変更すると、子テーブルのすべてのデータが削除されてしまうバグがあったのを修正しています。foreign_keys PRAGMAを無効にするタイミングに誤りがあった為。

参考:A mere add_foreign_key can wipe out your whole Rails+SQLite production table


ActionController::Parameters#deconstruct_keys for pattern matching


Remove mention of raise_on_open_redirects from doc

actionpack/lib/action_controller/metal/redirecting.rbの修正です。

ドキュメント内のraise_on_open_redirectsについて言及している箇所を削除しています。違うconfigが追加され、現在はdeprecatedになっている為。


Merge pull request #55226 from zzak/migrations_paths_doc

rails guideのActive Record Migrationsの修正です。

Creating a Standalone Migrationセクションに、migrationを格納するディレクトリは、config/database.ymlmigrations_pathsで変更出来る旨説明を追加しています。


Merge pull request #55789 from seanpdoyle/action_controller_parameters_pattern_matching

actionpack/lib/action_controller/metal/strong_parameters.rbの修正です。

pattern matchingをサポートする為に、ActionController::Parametersdeconstruct_keysメソッドを追加しています。

if params in { search:, page: }
  Article.search(search).limit(page)
elseend

case (value = params[:string_or_hash_with_nested_key])
in String
  # do something with a String `value`…
in { nested_key: }
  # do something with `nested_key` or `value`
else
  # …
end



以上の内容はhttps://y-yagi.hatenablog.com/entry/2025/10/18/045419より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14