Skip to content

Commit

Permalink
Merge pull request #98 from prathamesh-sonpatki/patch-1
Browse files Browse the repository at this point in the history
Mark ActiveRecord/Aliases as unsafe autocorrect
  • Loading branch information
koic authored Aug 1, 2019
2 parents aedb97c + 038af92 commit 20de97e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
1 change: 1 addition & 0 deletions config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Rails/ActiveRecordAliases:
Use `update!` instead of `update_attributes!`.
Enabled: true
VersionAdded: '0.53'
SafeAutoCorrect: false

Rails/ActiveRecordOverride:
Description: >-
Expand Down
2 changes: 1 addition & 1 deletion manual/cops_rails.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 20de97e

Please sign in to comment.