-
Notifications
You must be signed in to change notification settings - Fork 358
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 rails 6.1 errors is now array warnings #8408
Fix rails 6.1 errors is now array warnings #8408
Conversation
Is this code Rails 6.0 compatible, or will it have to be reverted if we need to revert 6.1? |
If I can ever get spec:javascript to fail locally and then pass in CI, I'll look to see if 6.0 will work with the array assumption. My hunch is this is a rails 7 change and we'd need to revert to go back to 6.0 |
This is not rail 6.0 friendly. |
Fixes this warning in several places in the test suite: ``` In Rails 6.1, `errors` is an array of Error objects, therefore it should be accessed by a block with a single block parameter like this: person.errors.each do |error| attribute = error.attribute message = error.message end You are passing a block expecting two parameters, so the old hash behavior is simulated. As this is deprecated, this will result in an ArgumentError in Rails 7.0. ```
b80f0c1
to
3f3815e
Compare
Checked commit jrafanie@3f3815e with ruby 2.6.10, rubocop 1.28.2, haml-lint 0.35.0, and yamllint app/controllers/application_controller/ci_processing.rb
|
This is low risk, but I said Oparin/no |
Don't put |
Fixes this warning in several places in the test suite: