Rubocop check for direct manipulation of ActiveModel errors hash
What does this MR do?
Related to #225874 (closed)
In preparation of Rails 6.1, we want to avoid directly manipulating the ActiveModel errors hash. This is because some manipulation might have no effect after the upgrade.
Instead we want to use the more explicit methods such as add
.
This MR adds a cop to detect such use cases.
Does this MR meet the acceptance criteria?
Conformity
-
📋 Does this MR need a changelog?-
I have included a changelog entry. -
I have not included a changelog entry because this is not user facing.
-
-
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process.