なるようになるブログ

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

rails commit log流し読み(2021/04/30)

2021/04/30分のコミットです。

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

activesupport/CHANGELOG.md

actionview/CHANGELOG.md


Merge pull request #42104 from Tonkpils/revert-autosave-breaking-change-until-fix

associationの定義が循環している場合にautosaveでrecordが二重に保存されてしまうバグがあったのを修正した、Only update dirty attributes once for cyclic autosave callbacksをRevertしています。

callbackの中でupdate_attributeを行うとSystemStackErrorが発生する、というリグレッションが発生した為。


Allow access to nested secrets by method calls

activesupport/lib/active_support/encrypted_configuration.rbの修正です。

Rails.application.credentialsでnestしたkeyにアクセスするのに、メソッドでアクセス出来るよう修正しています。

# Before
Rails.application.credentials.aws[:access_key_id]

# After
`Rails.application.credentials.aws.access_key_id`

Rename "master key" -> "primary key" in Active Record encryption

Active Recordのencryption処理で、keyに古い名前("master key")を使用していた箇所が残っていたのを、現在名前("primary key")に修正しています。


Used double quotes in template file for consistency.

template fileでシングルクォートを使用している箇所をまとめてダブルクォートに修正しています。


New-line before the codeblock

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

Using Concernsの項にあるexampleコードの前に改行が不足していた箇所があったのを修正しています。


[ci skip] Fix broken links on RDOC_MAIN.rdoc

railties/RDOC_MAIN.rdocの修正です。

リンクが壊れていた箇所があったのを修正しています。


Merge pull request #41727 from ghiculescu/patch-2

docの修正です。

API doc、及び、rails guideにsingular routing + form_withを使用する場合の説明を追加しています。


Fixed typo error in the documentation.

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

Using Concernsの項内のタイポを修正しています。


Pass default values for translate through I18n

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

ActionView::Helpers::TranslationHelper.translateメソッドのdefaultに指定した値を、I18n.translateで変換するよう修正しています。Hashや、補完が必要なStringが指定された場合に正しい結果が取得出来るようにする為。