diff --git a/CHANGELOG.md b/CHANGELOG.md index 0aec27826f..9234be92f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,8 @@ ### Changes -* [#98](https://github.com/rubocop-hq/rubocop-rails/pull/98): Mark `Rails/ActiveRecordAliases` as `SafeAutoCorrect` false and disable autocorrect by default. ([@prathamesh-sonpatki][]) +* [#98](https://github.com/rubocop-hq/rubocop-rails/pull/98): Mark `Rails/SaveBang` as `SafeAutoCorrect` false and disable autocorrect by default. ([@prathamesh-sonpatki][]) +* [#101](https://github.com/rubocop-hq/rubocop-rails/pull/101): Mark `Rails/SaveBang` as `SafeAutoCorrect` false and disable autocorrect by default. ([@prathamesh-sonpatki][]) ## 2.2.1 (2019-07-13) diff --git a/config/default.yml b/config/default.yml index 4a51a98092..bf9e24d8e0 100644 --- a/config/default.yml +++ b/config/default.yml @@ -404,6 +404,7 @@ Rails/SaveBang: VersionChanged: '0.59' AllowImplicitReturn: true AllowedReceivers: [] + SafeAutoCorrect: false Rails/ScopeArgs: Description: 'Checks the arguments of ActiveRecord scopes.' diff --git a/manual/cops_rails.md b/manual/cops_rails.md index b5603e000f..2915800d1d 100644 --- a/manual/cops_rails.md +++ b/manual/cops_rails.md @@ -2064,7 +2064,7 @@ ConvertTry | `false` | Boolean Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged --- | --- | --- | --- | --- -Disabled | Yes | Yes | 0.42 | 0.59 +Disabled | Yes | Yes (Unsafe) | 0.42 | 0.59 This cop identifies possible cases where Active Record save! or related should be used instead of save because the model might have failed to