@neerajdotname I extracted "skiping destroyed records" from block because for my solution it should be used in two places for iterating records for destroy and for iterating records for save.

Original implementation has a little complex logic as for me. Dividing it in simple blocks which can be extracted to some methods is more clear as for me.