Skip to content

Rubocop check for direct manipulation of ActiveModel errors hash

Mark Chao requested to merge 225874-rubocop into master

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

Availability and Testing

Merge request reports