Iterate over all records in Transaction#before_commit_records

Follow up to 6175f73f63:
we need to iterate over all records instead of the unique records when finding
callback candidates.
This commit is contained in:
Adrianna Chang 2022-12-13 10:25:01 -05:00
parent 19b08e2924
commit 8f67ca1af8
1 changed files with 1 additions and 1 deletions

View File

@ -173,7 +173,7 @@ module ActiveRecord
if @run_commit_callbacks
ite = unique_records
instances_to_run_callbacks_on = ite.each_with_object({}) do |record, candidates|
instances_to_run_callbacks_on = records.each_with_object({}) do |record, candidates|
candidates[record] = record
end