Conditional question fix for removing questions bug rails7 by johnpinto1 · Pull Request #3516 · DMPRoadmap/roadmap
John Pinto added 2 commits
April 28, 2025 11:26 In the case of a conditional question with answers that removed questions from different sections of a phase, any answers of removed questions were not removed, just hidden. Nor were the removed answers deleted in the database.
Changes:
- Added code to delete answers in AnswersController and ConditionsHelper in the database.
- Added javascript code in answers/edit.js and utils/sectionUpdate.js
to delete answers for removed questions.
Rspec tests updated in next commit.
rendancy and optimise code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters