なるようになるブログ

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

rails commit log流し読み(2024/12/13)

2024/12/13分のコミットです。

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

activemodel/CHANGELOG.md


Merge pull request #53923 from byroot/fix-nested-update-all-test

Lint/NestedMethodDefinition copを追加、及び、各ファイルにcopを適用しています。


Merge pull request #53887 from seanpdoyle/active-model-normalization

Active Record、Active Modelの修正です。

ActiveRecord::NormalizationActiveModel::Attributes::Normalizationを移動し、Active Modelだけでもnormalizes APIを使用出来るよう修正しています。

class User
  include ActiveModel::Attributes
  include ActiveModel::Attributes::Normalization
  attribute :email, :string
  normalizes :email, with: -> email { email.strip.downcase }
end

Fix returning docs for upsert_all [ci skip]

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

upsert_allメソッドのdoc内の戻り値について説明している箇所にタイポがあったのを修正しています。


[RF-DOCS] Remove stray closing tag in Rails 8 Authentication generator code snippet [ci-skip]

rails guideのSecuring Rails Applicationsの修正です。

Session Managementセクションにあるviewのexampleコード内に不要なタグがあったのを修正しています。


Fix removing foreign keys with :restrict action for MySQL

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

MySQLでmigrationファイルのforeign_key{ on_update: :restrict }を指定していた場合に、migrationのrollbackがエラーになってしまうバグがあったのを修正しています。