Extract update_record and create_record from save