diff --git a/CHANGELOG.md b/CHANGELOG.md index 04048e5e01..0aec27826f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ * [#53](https://github.com/rubocop-hq/rubocop-rails/issues/53): Fix a false positive for `Rails/SaveBang` when implicitly return using finder method and creation method connected by `||`. ([@koic][]) +### Changes + +* [#98](https://github.com/rubocop-hq/rubocop-rails/pull/98): Mark `Rails/ActiveRecordAliases` as `SafeAutoCorrect` false and disable autocorrect by default. ([@prathamesh-sonpatki][]) + ## 2.2.1 (2019-07-13) ### Bug fixes @@ -54,3 +58,4 @@ [@fedeagripa]: https://github.com/fedeagripa [@brunvez]: https://github.com/brunvez [@santib]: https://github.com/santib +[@prathamesh-sonpatki]: https://github.com/prathamesh-sonpatki diff --git a/config/default.yml b/config/default.yml index e8ea60d302..4a51a98092 100644 --- a/config/default.yml +++ b/config/default.yml @@ -31,6 +31,7 @@ Rails/ActiveRecordAliases: Use `update!` instead of `update_attributes!`. Enabled: true VersionAdded: '0.53' + SafeAutoCorrect: false Rails/ActiveRecordOverride: Description: >- diff --git a/manual/cops_rails.md b/manual/cops_rails.md index 017184d3c2..b5603e000f 100644 --- a/manual/cops_rails.md +++ b/manual/cops_rails.md @@ -51,7 +51,7 @@ Include | `app/controllers/**/*.rb` | Array Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged --- | --- | --- | --- | --- -Enabled | Yes | Yes | 0.53 | - +Enabled | Yes | Yes (Unsafe) | 0.53 | - Checks that ActiveRecord aliases are not used. The direct method names are more clear and easier to read.