なるようになるブログ

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

rails commit log流し読み(2023/08/23)

2023/08/23分のコミットです。

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

activerecord/CHANGELOG.md

activemodel/CHANGELOG.md


Adds a specific ArgumentError when passing nil to dom_id. Which can happen if you do something like pass a non-existent ivar dom_id(@something_non_existant)

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

dom_idメソッドの第一引数に不正な値(e.g. nil)が指定された場合にArgumentError`をraiseするよう修正しています。


Merge pull request #48983 from JoeDupuis/fix-regression-on-strict-has-one-through

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

strict_loadingを有効化している場合に、has_one through associationを使用してのmodelの作成がエラーになってしまうバグがあったのを修正しています。


Support composite identifiers in to_key

activemodel/lib/active_model/conversion.rbactiverecord/lib/active_record/attribute_methods/primary_key.rbの修正です。

to_keyメソッドでcomposite keysをサポートするよう修正しています。


Use a temporary file for storing unencrypted files while editing

activesupport/lib/active_support/encrypted_file.rbrailties/lib/rails/secrets.rbの修正です。

encrypted file編集時の一時ファイルが同じシステムにいる他のユーザがread出来る権限になっていたのを、ユーザがread出来ない権限になるよう修正しています。CVE-2023-38037。

参考: [CVE-2023-38037] Possible File Disclosure of Locally Encrypted Files - Security Announcements - Ruby on Rails Discussions


Fix 6.1 change_table setting datetime precision

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

Rails 6.1で作成されたchange_tableを実行するmigirationで、datetime型のprecisionが正しく設定されないバグがあったのを修正しています。


Use zzak/action-discord@v8

GitHub workflowsの修正です。

使用しているactionを最新バージョンに更新、APIのrate-limitに引っ掛からないようGITHUB_TOKENの指定を追加、失敗時にだけ必要な処理のチェックをfailureで行うよう修正、などを行っています。


[skip ci] Added missing $ for a bash script

rails guideのRuby on Rails 3.2 Release Notesの修正です。

bash scriptの先頭に$の記載が無い箇所があったのを修正しています。


Allow parent being the owner of an alias attribute method

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

Active Record modelを継承しているabstract classでalias attributeを定義する、かつ、original methodが親クラスに定義されているような場合に、deprecateメッセージが出力されないよう修正しています。


Improve the documentation for ActiveRecord::Inheritance#base_class

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

ActiveRecord::Inheritance#base_classのdocの言い回しを修正しています。


Add new behavior of undefine_attribute_methods to CHANGELOG

Active Model、Active Recordの修正です。

Call proxy methods from alias_attribute generated methodsundefine_attribute_methodsメソッドがalias attribute methodsもundefするよう挙動が変わったのですが、その変更後の挙動についてCHANGELOGにエントリー、及び、テストを追加しています。