2023/09/26分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
actionmailer/CHANGELOG.md
[skip ci] Missing language highligting added for bash code block
rails guideのUpgrading Ruby on Rails
の修正です。
exampleコードにcode highligtの指定が無い箇所があったのを修正しています。
Merge pull request #49336 from fatkodima/fix-mysql-expression-index-dumping
activerecord/lib/active_record/connection_adapters/mysql/schema_statements.rb
の修正です。
MySQL adapterでexpression indexをschemaファイルにdumpする際に、quoteに対するescape処理が不足していたのを修正しています。
Actually upload the files when passed as File or Pathname
activestorage/lib/active_storage/attached/changes/create_one.rb
の修正です。
has_one_attached
を指定しているattributeにFile
及びPathname
のオブジェクトを指定してのattachを出来るよう対応したAllow attaching File or Pathname to has_one_attachedで、DBへのデータへの保存は出来ていたがstorageへのファイルのアップロードが出来てなかったのを修正しています。
Merge pull request #45411 from jonathanhefner/add-deep_mergeable
activesupport/lib/active_support/core_ext/hash/deep_merge.rb
、
activesupport/lib/active_support/deep_mergeable.rb
の修正です。
Hash#deep_merge
の実装を専用のmodule(ActiveSupport::DeepMergeable
)に移動しています。ほかのクラス(ActionController::Parameters
)でも同じ実装を使用出来るようにするため。
Merge pull request #49322 from hachi8833/add_tests_for_exclusion_validation2
activemodel/test/cases/validations/exclusion_validation_test.rb
の修正です。
validates_exclusion_of
にbeginless/endless rangeを指定した場合のテストを追加しています。
Introduce ActionMailer::FormBuilder
Action Mailerの修正です。
mailerのviewのformで使用するdefault form builderをdefault_form_builder
メソッドで指定出来るよう修正しています。controllerでは指定出来るようなっており、挙動をあわせるため。
Add a public API for broadcasting logs:
Active Supportの修正です。
異なる複数のIOにまとめてログを出力出来るようにするためのbroadcasting logsの仕組みをpublic APIとして公開しています。
stdout_logger = Logger.new(STDOUT) file_logger = Logger.new("development.log") broadcast = ActiveSupport::BroadcastLogger.new(stdout_logger, file_logger) broadcast.info("Hello!") # ログはSTDOUTと"development.log"ファイル両方に出力される
activesupport/test/deep_mergeable_test.rb
の修正です。
[]
メソッド再定義によるRubyのwarningが出ていたのを修正しています。
Define the method in the right place
activesupport/test/deep_mergeable_test.rb
の修正です。
先程のRubyのwarning対応で行ったメソッドの定義方法が誤っていたのを修正しています。
Remove erroneous committed file
activerecord/test/storage/test.sqlite3
の修正です。
SQLiteのDBファイルがコミットされてしまっていたのを削除しています。
Don't leak database connection to other tests
activerecord/test/cases/adapters/postgresql/connection_test.rb
の修正です。
特定のテストでのみ使用する事を想定しているconnectionを、テストの後処理で削除するよう修正しています。
Update description for filter_parameter_logging (#49347)
railties/lib/rails/generators/rails/app/templates/config/initializers/filter_parameter_logging.rb.tt
の修正です。
Rails.application.config.filter_parameter
に関する説明の言い回しを修正しています。
Rename back unique keys to unique constraints
Active Recordの修正です。
PostgreSQLのunique constraintsを追加/削除するメソッドの名前がadd_unique_key
/remove_unique_key
になっていたのを、add_unique_constraint
/remove_unique_constraint
に変更しています。ドキュメント等の説明でunique constraintsを追加/削除する為の処理である旨説明されており、その為のメソッドがadd_unique_key
/remove_unique_key
となっているのは混乱の元だろう、という事で変更されています。
Fix typo "an unique" -> "a unique" [ci skip]
activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb
のdocの修正です。
unique_constraint
メソッドのdocのグラマーの修正を行っています。
Revert "Document clean chain behavior for ActiveRecord scope"
rails guideのscopeをchainした場合の挙動について説明した、Document clean chain behavior for ActiveRecord scopeをRevertしています。
説明として誤っていたり不明呂な箇所があり、一旦Revertして再度PRを作成して改善するのが良いのでは、という指摘が入った為Revertされています。
Add 7.1 release notes for SQLite3 adapter improvements
rails guideのRuby on Rails 7.1 Release Notes
の修正です。
Add SQLite3 support for supports_insert_returning?やPerformance tune the SQLite3 adapter connection configurationなどで行われたSQLite3 adapter関連の改善についてNotable changes
に説明を追加しています。