2021/06/25分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
- Allow preloading of associations with instance dependent scopes
- Set precision 6 by default for
datetime
columns
actionmailbox/CHANGELOG.md
Convert strict_loading_mode from class attr to ivar
activerecord/lib/active_record/associations/association.rb
、
activerecord/lib/active_record/core.rb
の修正です。
strict_loading_mode
をclass attrからivarに変更しています。 :n_plus_one_only
はrecordのみをサポートしており、classに指定されても動作しない為。
Merge pull request #42553 from jhawthorn/preload_instance_scope
Active Recordの修正です。
instance dependent associationsをpreload出来るよう修正しています。instance dependent associationsは、下記のようにassociationにscope + 引数が定義さており、その内容により結果が変わるようなassociationのこと。
has_many :posts_mentioning_author, ->(author) { where("posts.body LIKE ?", "%#{author.name.downcase}%") }, class_name: "Post"
Implement ActionMailbox incinerate in conductor
Action Mailboxの修正です。
Action Mailboxのdevelopment用の検証ページで、inbound messageのincinerateを出来るよう修正しています。
Merge pull request #42590 from eileencodes/fix-disable-joins-with-sti-type
Active Recordの修正です。
modelがSTI enum typeが保持している場合、disable joinsがtrueの場合にそのtypeが適用されないバグがあったのを修正しています。
rails guideのActive Storage Overview
の修正です。
Active Storageのdefault routesを無効化する方法についての説明を追加しています。
Skip logging backtrace when exception is in rescue_responses
Action Packの修正です。
rescued_responses
で指定されているexceptionについて、DebugExceptions
でそのexceptionに関するlogを出力するかどうかをconfig(config.action_dispatch.log_rescued_responses
)で指定出来るよう対応しています。デフォルトはlogを出力するようになっており、
config.action_dispatch.log_rescued_responsesにfalseを指定すると、
rescued_responses`で指定されたExceptionについてはlogを出力しないようになります。
rails guideのAction Controller Overview
の修正です。
ライブラリ側で使用されているメソッドをcontrollerのactionとして再定義した場合、SystemStackError
が発生する事がある旨説明を追加しています。
Split out TestRun from ci/qunit-selenium-runner to separate file
ci/qunit-selenium-runner.rb
、ci/test_run.rb
の修正です。
JSのテスト用のクラスのうち、テスト結果を確認する為のクラスを別ファイルに分けるよう修正しています。
Set precision 6 by default for datetime
Active Recordの修正です。
migrationのdatetime
columnにデフォルトでprecision: 6
を指定するよう修正しています。
Improve ActiveStorage security documentation [ci skip]
Active Storageのdocの修正です。
各controllerのdocに、生成されるURLに認証を入れたい場合の、対応方法について説明したドキュメントへのリンクを追加しています。
Report async queries lock wait duration
activerecord/lib/active_record/future_result.rb
、
activerecord/lib/active_record/log_subscriber.rb
の修正です。
async queriesのログに、lock waitした期間の情報も出力するよう修正しています。実際にどれだけwaitが発生したか(asyncにした意味があるのか)を確認出来るようにする為。
railties/test/application/rake/multi_dbs_test.rb
の修正です。
テスト名が仮の名前のままになってしまっていた箇所があったのを修正しています。