Fix hidden_field_tag Nested Attributes Format For Rails 7 Upgrade and Add Test Coverage#3479
Merged
aaronskiba merged 4 commits intoDMPRoadmap:developmentfrom Mar 12, 2025
Conversation
This adds test coverage for a previously undetected Rails 7 breaking change affecting nested attribute params structure in `hidden_field_tag`
This change addresses a breaking issue introduced by the Rails 7 upgrade, where the hidden_field_tag parameters for nested attributes were not being processed correctly. The parameter structure has been updated to match Rails 7's expected format, ensuring proper handling of nested associations.
`execute_script('arguments[0].click();', modal_close_button)` works locally, however, the modal seems to be failing to close when the test is run as a GitHub Action.
- Strangely `execute_script('arguments[0].click();', modal_close_button)` works as a GitHub Action when executed for the 'Modal search opens and closes and allows user to search, select and remove items' test within this same file.
d8db709 to
8a7d832
Compare
johnpinto1
approved these changes
Mar 10, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes #3478
Changes proposed in this PR:
hidden_field_tagnested attributes format for Rails 7 compatibility b417f28repositoriesandmetadata_standardsassociations when creating or updating aresearch_output(See Breaking Change:hidden_field_tagfor Nested Attributes Not Working After Upgrading to Rails 7 #3478 for more info).