Skip to content

Conversation

@ekohl
Copy link
Member

@ekohl ekohl commented Dec 5, 2024

Using errors[:field] << 'the error' is deprecated in favor of errors.add(:field, 'the error'). Instances found using:

rg 'errors\[.+\]\s+<<'

Using `errors[:field] << 'the error'` is deprecated in favor of
`errors.add(:field, 'the error')`. Instances found using:

    rg 'errors\[.+\]\s+<<'
@ofedoren
Copy link
Member

ofedoren commented Dec 5, 2024

Is this the same as 4d569a2?

Also, not all of the @errors are ActiveModel::Errors instances, the test failures are related

@ekohl
Copy link
Member Author

ekohl commented Dec 5, 2024

Oh, I think you're right. Shall I close this instead or do we want to get this merged so #10299 is a bit smaller?

@ofedoren
Copy link
Member

ofedoren commented Dec 5, 2024

Oh, I think you're right. Shall I close this instead or do we want to get this merged so #10299 is a bit smaller?

Mostly depends on you :) If you adjust PR, so the tests are green, we can merge it and I'll rebase my PR, no problem.

The only thing why I'd like to have these changes in Rails 7 PR, so if anyone will try to see why their plugin stopped working or what we did to upgrade Rails, they'll find this as a must have. But probably this particular change is obvious looking on the Rails change log and deprecation warnings :)

@ekohl
Copy link
Member Author

ekohl commented Dec 5, 2024

Given how close we are to merging, I'm going to close this.

@ekohl ekohl closed this Dec 5, 2024
@ekohl ekohl deleted the 38068-use-errors.add branch December 5, 2024 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants