2024/01/17分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
activestorage/CHANGELOG.md
actiontext/CHANGELOG.md
activemodel/CHANGELOG.md
Fix calculation of SQL runtime
activerecord/lib/active_record/runtime_registry.rb
の修正です。
ActiveSupport::Notifications
で使用するSQLの実行時間の計算式に誤りがあったのを修正しています。
Merge pull request #50723 from aeroastro/feature/no-file-in-load-path
railties/lib/rails/paths.rb
の修正です。
autoload_paths
やeager_load_paths
を設定する際に、ファイルのpathも追加されていたのを、ディレクトリのみ追加するよう修正しています。
Merge pull request #50758 from rails/fix-video-preview-nplus1
activestorage/app/models/active_storage/attachment.rb
、
activestorage/lib/active_storage/attached/model.rb
の修正です。
Active Storageのattachmentをloadするためのqueryで、image以外のassetのpreview取得処理のSQLがN+1になってしまっていたのを修正しています。
Edit pass over the railties CHANGELOG
railties/CHANGELOG.md
の修正です。
先のload pathに関する対応のエントリーの説明を修正、及び、各箇所のグラマーやフォーマットの修正を行っています。
Use includes
instead of eager_load
for with_all_rich_text
actiontext/lib/action_text/attribute.rb
の修正です。
with_all_rich_text
メソッドでassociatinoをloadするのにeager_load
を使用していたのをincludes
を使用するよう修正しています。
joinを使用してのassociationのlaodが行われると、データが大量にあるケースで性能劣化の原因になってしまう可能性があるため。
Fix t.references validating options on Rails < 7.1
activerecord/lib/active_record/migration/compatibility.rb
の修正です。
Rails 7.0以下のmigrationファイルでadd_referenceメソッドに指定するオプションが正しいかのチェックが誤って行われてしまうバグがあったのを修正した、Fix add_reference options validated on < 7.1のフォローアップとして、change_table
メソッド内でreferences
メソッドが実行された場合もチェックを行わないよう修正しています。
TZ offset minute has to be negated in the Western Hemisphere
activemodel/lib/active_model/type/helpers/time_value.rb
Active Modelのtime typeのcast処理で、minus offsetがStringで指定された場合(e.g. 2023-01-01T00:00:00-03:30
)に、値が正しくパースされないバグがあったのを修正しています。
Merge pull request #50756 from Angy-h/getting-started-update-screenshot
rails guideのGetting Started with Rails
で使用しているスクリーンショットを最新の内容に更新しています。
Fix ActiveSupport::Notifications.publish_event
to preserve units
activesupport/lib/active_support/notifications/instrumenter.rb
の修正です。
ActiveSupport::Notifications.publish_event
で実行時間の計算に使用する値の単位が統一出来ておらず、実行時間が正しく表示されないバグがあったのを修正しています。
Fix single quote escapes on default generated MySQL columns
activerecord/lib/active_record/connection_adapters/mysql/schema_statements.rb
の修正です。
MySQLでgenerated columnsを使用している、かつ、式でシングルクォートが使われている場合に、そのcolumnsをschema dumpに出力する場合にクォートが更にエスケープされた状態で出力されていました。しかし、この状態だとインポート時にエラーになってしまう為、不要なクォートが出力されないよう修正しています。