Skip to content

Commit 12d502c

Browse files
committed
sort model id on client to ensure order of children
1 parent f81d064 commit 12d502c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ruby/hyper-model/lib/reactive_record/active_record/reactive_record/isomorphic_base.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ def self.gather_records(records_to_process, force, record_being_saved)
242242
end if record.new? || record.changed? || (record == record_being_saved && force)
243243
record_index += 1
244244
end
245-
[models, associations, backing_records]
245+
[models.sort_by { |model| model[:id] }, associations, backing_records]
246246
end
247247

248248
def save_or_validate(save, validate, force, &block)

0 commit comments

Comments
 (0)