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 #49055] Raise an ArgumentError
when #accepts_nested_attributes_for
is redeclared for an association
#49056
Merged
rafaelfranca
merged 1 commit into
rails:main
from
joshuay03:raise-on-duplicate-accepts-nested-attributes-for
Sep 6, 2023
Merged
[Fix #49055] Raise an ArgumentError
when #accepts_nested_attributes_for
is redeclared for an association
#49056
rafaelfranca
merged 1 commit into
rails:main
from
joshuay03:raise-on-duplicate-accepts-nested-attributes-for
Sep 6, 2023
Conversation
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
joshuay03
changed the title
[Fix #49055] Raise an ArgumentError when
[Fix #49055] Raise an Aug 28, 2023
#accepts_nested_attributes_for
is redeclared for an associationArgumentError
when #accepts_nested_attributes_for
is redeclared for an association
joshuay03
force-pushed
the
raise-on-duplicate-accepts-nested-attributes-for
branch
4 times, most recently
from
August 28, 2023 06:44
64e03d9
to
a42c466
Compare
Looking into the failing tests, all of them seem to be from I'll also be careful not to change the expectation here when doing so. |
joshuay03
force-pushed
the
raise-on-duplicate-accepts-nested-attributes-for
branch
2 times, most recently
from
August 28, 2023 07:45
1c24635
to
0d1c3d2
Compare
ghiculescu
reviewed
Aug 28, 2023
joshuay03
force-pushed
the
raise-on-duplicate-accepts-nested-attributes-for
branch
from
August 29, 2023 21:39
0d1c3d2
to
4cdb1c9
Compare
seanpdoyle
reviewed
Aug 30, 2023
seanpdoyle
reviewed
Aug 30, 2023
seanpdoyle
reviewed
Aug 30, 2023
joshuay03
force-pushed
the
raise-on-duplicate-accepts-nested-attributes-for
branch
from
August 30, 2023 13:05
4cdb1c9
to
56f5311
Compare
Cheers for the review @seanpdoyle I've addressed your comments. |
…ibutes_for` is redeclared for an association
rafaelfranca
force-pushed
the
raise-on-duplicate-accepts-nested-attributes-for
branch
from
September 6, 2023 15:28
56f5311
to
0a54155
Compare
chaadow
reviewed
Sep 30, 2023
4 tasks
joshuay03
deleted the
raise-on-duplicate-accepts-nested-attributes-for
branch
January 12, 2024 12:23
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.
Motivation / Background
This Pull Request has been created to fix #49055.
Detail
This Pull Request changes
ActiveRecord::NestedAttributes#accepts_nested_attributes_for
to raise anArgumentError
when it has already been declared for an association in the same class. There is a use case for overriding this in subclasses, that functionality is unchanged.Additional information
Checklist
Before submitting the PR make sure the following are checked:
[Fix #issue-number]