Skip to content

Commit

Permalink
Merge pull request #331 from koic/mark_safe_autocorrect_for_rails_uni…
Browse files Browse the repository at this point in the history
…q_before_pluck

Mark `Rails/UniqBeforePluck` cop as unsafe auto-correction
  • Loading branch information
koic committed Aug 19, 2020
2 parents c22496c + 523ddfb commit 8d97561
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Expand Up @@ -20,7 +20,7 @@
* [#312](https://github.com/rubocop-hq/rubocop-rails/pull/312): Mark `Rails/MailerName` as unsafe for auto-correct. ([@eugeneius][])
* [#294](https://github.com/rubocop-hq/rubocop-rails/pull/294): Update `Rails/ReversibleMigration` to register offenses for `remove_columns` and `remove_index`. ([@philcoggins][])
* [#310](https://github.com/rubocop-hq/rubocop-rails/issues/310): Add `EnforcedStyle` to `Rails/PluckInWhere`. By default, it does not register an offense if `pluck` method's receiver is a variable. ([@koic][])
* [#320](https://github.com/rubocop-hq/rubocop-rails/pull/320): Mark `Rails/UniqBeforePluck` as unsafe. ([@kunitoo][])
* [#320](https://github.com/rubocop-hq/rubocop-rails/pull/320): Mark `Rails/UniqBeforePluck` as unsafe auto-correction. ([@kunitoo][])
* [#324](https://github.com/rubocop-hq/rubocop-rails/pull/324): Make `Rails/IndexBy` and `Rails/IndexWith` aware of `to_h` with block. ([@eugeneius][])

## 2.7.1 (2020-07-26)
Expand Down
2 changes: 1 addition & 1 deletion config/default.yml
Expand Up @@ -664,7 +664,7 @@ Rails/UniqBeforePluck:
SupportedStyles:
- conservative
- aggressive
Safe: false
SafeAutoCorrect: false
AutoCorrect: false

Rails/UniqueValidationWithoutIndex:
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/cops_rails.adoc
Expand Up @@ -3979,7 +3979,7 @@ Time.at(timestamp).in_time_zone
| Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged

| Enabled
| No
| Yes
| Yes (Unsafe)
| 0.40
| 2.8
Expand Down

0 comments on commit 8d97561

Please sign in to comment.