Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix conditional content rendering bug #288

Merged
merged 1 commit into from
Jun 3, 2021

Conversation

peteryates
Copy link
Member

@peteryates peteryates commented Jun 3, 2021

This was a bit of a tricky one to trace as it doesn't manifest in plain Ruby (so wasn't caught by the specs and works properly in the guide) but does from ERB.

Essentially, the refactor to remove duplication between fieldset radios and checkboxes (10fd3fb), while looking harmless, sets the block.call to a variable that's then captured, rather than capturing the block.call directly. This caused the conditional content to be rendered outside of its wrapper.

This was a bit of a tricky one to trace as it doesn't manifest in plain
Ruby (so wasn't caught by the specs and works preoprly in the guide) but
does from ERB.

Essentially, the refactor to remove duplication between fieldset radios
and checkboxes (10fd3fb), while looking harmless, sets the
`block.call` to a variable that's then captured, rather than
capturing the `block.call` directly.
@peteryates peteryates added the bug Something isn't working label Jun 3, 2021
@peteryates peteryates merged commit cfb3b7a into master Jun 3, 2021
@peteryates peteryates deleted the fix-conditional-content-rendering-bug branch June 3, 2021 19:40
peteryates added a commit to DFE-Digital/get-into-teaching-app that referenced this pull request Jun 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant