Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

fix merging the targer lists in 1.8. #1425

Closed
wants to merge 1 commit into
from
Jump to file or symbol
Failed to load files and symbols.
+2 −3
Split
@@ -402,9 +402,8 @@ def merge_target_lists(persisted, memory)
return memory if persisted.empty?
persisted.map! do |record|
- mem_record = memory.delete(record)
-
- if mem_record
+ if mem_id = memory.index(record)
+ mem_record = memory.delete_at(mem_id)
(record.attribute_names - mem_record.changes.keys).each do |name|
mem_record[name] = record[name]
end