Skip to content

Commit 20de97e

Browse files
authored
Merge pull request #98 from prathamesh-sonpatki/patch-1
Mark ActiveRecord/Aliases as unsafe autocorrect
2 parents aedb97c + 038af92 commit 20de97e

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010

1111
* [#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][])
1212

13+
### Changes
14+
15+
* [#98](https://github.com/rubocop-hq/rubocop-rails/pull/98): Mark `Rails/ActiveRecordAliases` as `SafeAutoCorrect` false and disable autocorrect by default. ([@prathamesh-sonpatki][])
16+
1317
## 2.2.1 (2019-07-13)
1418

1519
### Bug fixes
@@ -54,3 +58,4 @@
5458
[@fedeagripa]: https://github.com/fedeagripa
5559
[@brunvez]: https://github.com/brunvez
5660
[@santib]: https://github.com/santib
61+
[@prathamesh-sonpatki]: https://github.com/prathamesh-sonpatki

config/default.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Rails/ActiveRecordAliases:
3131
Use `update!` instead of `update_attributes!`.
3232
Enabled: true
3333
VersionAdded: '0.53'
34+
SafeAutoCorrect: false
3435

3536
Rails/ActiveRecordOverride:
3637
Description: >-

manual/cops_rails.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Include | `app/controllers/**/*.rb` | Array
5151

5252
Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged
5353
--- | --- | --- | --- | ---
54-
Enabled | Yes | Yes | 0.53 | -
54+
Enabled | Yes | Yes (Unsafe) | 0.53 | -
5555

5656
Checks that ActiveRecord aliases are not used. The direct method names
5757
are more clear and easier to read.

0 commit comments

Comments
 (0)