Fixed bug: Import detects unchanged associations as changed and unnecessarily updates record.

This commit is contained in:
Thorsten Eckel 2017-10-10 16:21:59 +02:00
parent 4dcdcf1d30
commit b0bfe42437

View file

@ -156,6 +156,10 @@ module Import
else
state[association] = source.send(association)
end
# sort arrays to avoid wrong change detection
next if !state[association].respond_to?(:sort!)
state[association].sort!
end
state
end