2024/11/16分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
- Add
affected_rows
tosql.active_record
Notification. - Allow to reset cache counters for multiple records.
Merge pull request #53587 from calebhearth/more-explicit-upgrade-notes-about-encryption
rails guideのRuby on Rails 7.1 Release Notes
、Upgrading Ruby on Rails
の修正です。
ActiveRecord::Encryption
で使用されるhash digestのデフォルトが変更になっている事の説明と、変更後のhash digestを使用する為に必要な対応についての説明を追加しています。
Merge pull request #53065 from larouxn/add_active_support_notifications_event_assertions
activesupport/lib/active_support/test_case.rb
、
activesupport/lib/active_support/testing/notification_assertions.rb
の修正です。
特定のパターンとpayloadでActiveSupport::Notifications
がemitされたか(またはされてないか)どうかをテストで確認するためのassertionメソッドを追加しています。追加されたのは、assert_notification
、assert_notifications_count
、及び、capture_notifications
です。
assert_notification("post.submitted", title: "Cool Post") do post.submit(title: "Cool Post") # => emits matching notification end
Merge pull request #53621 from p8/railties/only-include-permission-policy-middleware-if-present
Action Pack、railtiesの修正です。
initializerでpermission policyの設定が定義されている場合のみ、::ActionDispatch::PermissionsPolicy::Middleware
をincludeするよう修正しています。
Merge pull request #53555 from Earlopain/update-configuring-guide-defaults
rails guideのConfiguring Rails Applications
の修正です。
config.active_record.query_log_tags_enabled
及びconfig.active_support.disallowed_deprecation
についての説明を、Rails 8.0で新規にアプリケーションを作成した場合のenvironment filesの設定内容と合うよう修正しています。
Merge pull request #53557 from gabrielso/authentication_avoid_query
railties/lib/rails/generators/rails/authentication/templates/app/controllers/concerns/authentication.rb.tt
の修正です。
authentication
generatorが生成するコード内のcookieに設定されたsession idを使用してのセッションの取得処理で、cookieに該当のsession idが無い場合、セッションの取得処理を行わないよう修正しています。
Merge pull request #53563 from Uaitt/point-to-ruby-3.3.6-documentation-in-rails-guides
docの修正です。
docs.ruby-lang.org へのリンクを指定している箇所が、特定のRubyのバージョンのdocへのリンクになっていたのを、バージョンの指定を削除(常に最新バージョンへのリンクになる)するよう修正しています。
Prefer official Ruby documentation
docの修正です。
docのリンク先にwww.ruby-doc.orgを使用している箇所があったのを、docs.ruby-lang.orgに修正しています。
Fix non-ascii char column name in deferred foreign key
activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb
の修正です。
カラム名にascii外の文字を使用していた場合に、deferrable foreign keyの設定がdumpファイルに出力されないバグがあったのを修正しています。
Add affected_rows to sql.active_record
Active Recordの修正です。
sql.active_record
notificationのpayloadにaffected_rows
(影響があった行数)を追加しています。クライアントに処理結果の件数は返さないのでrow_count
ではわからない、しかし大量のデータ更新等、 レプリケーションの遅延などに影響が出るかもしれないSQLをチェック出来るようにする為、との事です。
Don't parse response content type if value comes from Mime
Action Packの修正です。
Mime typeのsymbolの値をcontent typeに指定出来るよう修正しています。
response.content_type = :html
この場合、stringと異なり正規表現を使用してのmime typeのパース処理が行われない為、stringの場合より少し処理が高速になるようになっています。
Merge pull request #52893 from boddhisattva/add_docs_explain_with_buffer_option_in_postgres
rails guideのActive Record and PostgreSQL
の修正です。
explain
メソッドの使いかたについての説明を追加しています。
Remove test_unit plugin_generator
railtiesの修正です。
現在は使用していない古いplugin用のテストファイルのgeneratorを削除しています。
Allow to reset cache counters for multiple records
activerecord/lib/active_record/counter_cache.rb
の修正です。
reset_counters
メソッドに複数のレコードのidを指定出来るよう修正しています。
Aircraft.reset_counters([1, 2, 3], :wheels_count)