forked from rails/rails
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fix rails#54267 - In rails#53951, the goal was to allow saving a record and its association even if the association had existing invalid records in the DB. We would not validate the association in that case. The problem of not validating, is that it stops the validation chain and it's possible that other records in subsequent relations are being modified and are invalid. e.g. `Company -has_many-> Developers -has_many-> Computers`, if a computer is changed with invalid value and the company get saved, this would bypass the computer validation and persist it. This commit fixes that by ensuring there are no validation errors from *changed* records in the whole association chain.
- Loading branch information
1 parent
1dcfe23
commit 05e3551
Showing
4 changed files
with
101 additions
and
24 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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