roadmap
roadmap copied to clipboard
Refactor `AnswersController#create_or_update`
Changes proposed in this PR:
- Refactor
AnswerController#create_or_update- The majority of this refactor extracts logic from the
create_or_updateaction into separate private helper methods (commits 609d5df3b8a66d1a2adc739a9b8fde038a3de72d, efecb337795f999de6679576cd3fd7ee0a5683f3, and a840abb1415e64888e51b1fdc268f550e8f1f4bb) - Commit 3534ee055e00be5f22d5c8702dcee8b68ec2de69 maintains the functional behaviour of the destruction of answers, but uses
.destroy_allrather than iterating through each individual answer.
- The majority of this refactor extracts logic from the
- b40a04c92ee9a6dd4af4fcbeb47f9e4c2feca84b removes an unused variable from
app/javascript/src/utils/sectionUpdate.js - b025dfe56de5fc23ad95667c5d487ccb515a4b73 addresses conflicting comments regarding the available
localsvariables available withinapp/views/answers/_new_edit.html.erb.
| 1 Warning | |
|---|---|
| :warning: | There are code changes, but no corresponding tests. Please include tests if this PR introduces any modifications in behavior. \n Ignore this warning if the PR ONLY contains translation.io synced updates. |
Generated by :no_entry_sign: Danger