Example Code Refactoring
The following code needs to be updated and refactored to work in a modified workflow.
Current Code Operational Notes
QuestionImagecan be created without an existing
- An array of
image_idsmust be maintained and passed to method.
assign_imagesmust be invoked when modifying
QuestionImagecan still be created without an existing
- Inserted images will added to
bodywith the format of
bodyshould be the sole source of truth for the related
- Image assignment should a lifecycle event.
- Unused images should be removed.