refactor code for updating acts_as_voodoo instances when saving and HTTP PATCH requests