なるようになるブログ

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

rails commit log流し読み(2022/10/20)

2022/10/20分のコミットです。

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

activerecord/CHANGELOG.md


Avoid encrypt + decrypt on attribute assignment

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

ActiveRecord::Encryptionを使用しているattributeをassignする際に、不要なencrypt、decrypt処理が行われないよう修正しています。


Fix encryption of column default values

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

ActiveRecord::Encryptionを使用しているattributeにcolumn default valueを指定した場合に、encryptした値が設定されないバグがあったのを修正しています。


Add read_attribute_for_database

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

serialization後のattributeの値を返す為のread_attribute_for_databaseメソッドを追加しています。


Fix a bug where using groups and counts with long table names would return incorrect results.

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

テーブル名が一定以上の長さの場合に、そのテーブルに対するgroup + countの結果が正しく取得出来ないバグがあったのを修正しています。


Fixup CHANGELOGs [ci-skip]

activerecord/CHANGELOG.mdrailties/CHANGELOG.mdの修正です。

各エントリーのフォーマットの修正を行っています。


Skip validation options for change_* in old migrations

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

古いRailsのバージョンで作られたmigrationファイルについては、migrateメソッドのオプションのvalidation処理は行わないよう修正しています。元々動いていた処理がエラーになってしまう可能性がある為。