Skip to content

Commit

Permalink
Merge pull request #101 from prathamesh-sonpatki/rails-bang-unsafe
Browse files Browse the repository at this point in the history
Mark Rails/SaveBang as unsafe autocorrect
  • Loading branch information
koic authored Aug 8, 2019
2 parents 20de97e + eca224b commit 965cd51
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
### Changes

* [#98](https://github.com/rubocop-hq/rubocop-rails/pull/98): Mark `Rails/ActiveRecordAliases` 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)

Expand Down
1 change: 1 addition & 0 deletions config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@ Rails/SaveBang:
VersionChanged: '0.59'
AllowImplicitReturn: true
AllowedReceivers: []
SafeAutoCorrect: false

Rails/ScopeArgs:
Description: 'Checks the arguments of ActiveRecord scopes.'
Expand Down
2 changes: 1 addition & 1 deletion manual/cops_rails.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 965cd51

Please sign in to comment.