2023/09/25分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
- Allow SQLite3
busy_handlerto be configured with simple max number ofretries - Performance tune the SQLite3 adapter connection configuration
activestorage/CHANGELOG.md
Merge pull request #49352 from fractaledmind/ar-sqlite-retries
activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rbの修正です。
SQLite3でlockなどによりBusyエラーが発生した場合に、自動でリトライ出来るよう修正しています。リトライはdatabase.ymlのretriesが指定された場合に、指定された回数分実行されるようになっています。
参考: Register A Callback To Handle SQLITE_BUSY Errors
Performance tune the SQLite3 adapter connection configuration
activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rbの修正です。
SQLite3 adapterでDBに接続する際に、journal_modeやmmap_size等の設定を行うよう修正しています。SQL実行時の性能改善のため、との事です。
参考: Enhancing your Rails app with SQLite
Update doc for include_hidden form form file_field.
actionview/lib/action_view/helpers/form_helper.rbのdocの修正です。
file_fieldメソッドのdoc内の:include_hiddenオプションについて説明している箇所に、:include_hiddenオプションのデフォルト値はconfig.active_storage.multiple_file_field_include_hiddenに依存する旨説明を追加しています。
Update requires in LoggerThreadSafeLevel
activesupport/lib/active_support/logger_thread_safe_level.rbの修正です。
使用していないrequireを削除しています。
Minor edits in the upgrading guide
rails guideのUpgrading Ruby on Railsの修正です。
config.autoload_lib and config.autoload_lib_onceについて説明している箇所のグラマーを修正しています。
Allow attaching File or Pathname to has_one_attached
activestorage/lib/active_storage/attached/changes/create_one.rbの修正です。
has_one_attachedを指定しているattributeにFile、及び、Pathnameのオブジェクトを指定してのattachの作成を出来るよう修正しています。 テストでデータの作成を簡易に出来るようにする為。
User.create!(avatar: File.open("image.jpg")) User.create!(avatar: file_fixture("image.jpg"))
Merge pull request #48462 from iamradioactive/remove_additional_query
activerecord/lib/active_record/encryption/extended_deterministic_uniqueness_validator.rbの修正です。
Encrypted Attributeを使用しているattributeにuniqueness validationを指定している、かつ、uniqueness validationでエラーになった場合にエラーが2つ表示される(暗号化された値、復号化された値それぞれでvalidationチェックが行われてしまっていた)バグがあったのを修正しています。
Fix an incorrect assert_equal argument order
activerecord/test/cases/encryption/uniqueness_validations_test.rbの修正です。
assert_equalの引数の順番が誤っていたのを修正しています。