2022/10/21分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
activerecord/lib/active_record/railtie.rb
の修正です。
Deprecate delegation to connection handler from Baseの対応の際に修正漏れがあったのを対応しています。
Fix ciphertext_for for yet-to-be-encrypted values
activerecord/lib/active_record/encryption/encryptable_record.rb
の修正です。
ciphertext_for
メソッドが、値がDBに保存されていない場合などに平文を返してしまっていたのを、返せる場合は暗号化した値を返すよう修正しています。
Post.encrypts :body post = Post.create!(body: "Hello") # Before post.body = "World" post.ciphertext_for(:body) # => "World" # After post.body = "World" post.ciphertext_for(:body) # => "{\"p\":\"xyz..."
Avoid value_for_database if attribute not updated
activemodel/lib/active_model/attribute.rb
の修正です。
attributeが更新されていない場合、不要なvalue_for_database
メソッドの呼び出しを行わないよう修正しています。
Fix Action View compatibility with jbuilder
actionview/lib/action_view/renderer/abstract_renderer.rb
、
actionview/lib/action_view/template.rb
の修正です。
RenderedTemplate
のbody
引数がStringのみを想定していたのを、String以外の場合も動作するよう修正しています。jbuilderがbody
にHashを指定する為。
Allow ErrorReporter to handle several error classes
activesupport/lib/active_support/error_reporter.rb
の修正です。
Rails.error.handle
及び Rails.error.record
で処理を行う対象のエラークラスに、複数のクラスを指定出来るよう修正しています。
Rails.error.handle(ArgumentError, TypeError) do [1, 2, 3].first(x) end