diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ed2d12aab..dbe0903bb1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,10 +28,12 @@ * [#444](https://github.com/rubocop/rubocop-rails/issues/444): Mark `Rails/Blank` as unsafe auto-correction. ([@koic][]) * [#451](https://github.com/rubocop/rubocop-rails/issues/451): Make `Rails/RelativeDateConstant` aware of `yesterday` and `tomorrow` methods. ([@koic][]) * [#454](https://github.com/rubocop/rubocop-rails/pull/454): Mark `Rails/WhereExists` as unsafe auto-correction. ([@koic][]) +* [#403](https://github.com/rubocop/rubocop-rails/pull/403): Mark `Rails/WhereEquals` as unsafe auto-correction. ([@koic][]) * [#379](https://github.com/rubocop/rubocop-rails/issues/379): Mark `Rails/DynamicFindBy` as unsafe. ([@koic][]) * [#456](https://github.com/rubocop/rubocop-rails/pull/456): Drop Ruby 2.4 support. ([@koic][]) * [#462](https://github.com/rubocop/rubocop-rails/pull/462): Require RuboCop 1.7 or higher. ([@koic][]) + ## 2.9.1 (2020-12-16) ### Bug fixes diff --git a/config/default.yml b/config/default.yml index 2b0fe90ee4..edcceba62e 100644 --- a/config/default.yml +++ b/config/default.yml @@ -782,7 +782,9 @@ Rails/WhereEquals: Description: 'Pass conditions to `where` as a hash instead of manually constructing SQL.' StyleGuide: 'https://rails.rubystyle.guide/#hash-conditions' Enabled: 'pending' + SafeAutoCorrect: false VersionAdded: '2.9' + VersionChanged: '2.10' Rails/WhereExists: Description: 'Prefer `exists?(...)` over `where(...).exists?`.' diff --git a/docs/modules/ROOT/pages/cops_rails.adoc b/docs/modules/ROOT/pages/cops_rails.adoc index 75429617b3..97bd19d020 100644 --- a/docs/modules/ROOT/pages/cops_rails.adoc +++ b/docs/modules/ROOT/pages/cops_rails.adoc @@ -4585,9 +4585,9 @@ validates :foo, uniqueness: true | Pending | Yes -| Yes +| Yes (Unsafe) | 2.9 -| - +| 2.10 |=== This cop identifies places where manually constructed SQL