Skip to content

Commit

Permalink
[Fix rubocop#546] Exclude app/models by default for Rails/ContentTag
Browse files Browse the repository at this point in the history
Fixes rubocop#546

This PR excludes `app/models` by default for `Rails/ContentTag`.
Because it prevents false positives for `tag` calls to `has_one: tag`.
No helpers are used in normal models.
  • Loading branch information
koic committed Sep 14, 2021
1 parent 41245e0 commit 47f7993
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* [#546](https://github.com/rubocop/rubocop-rails/issues/546): Exclude `app/models` by default for `Rails/ContentTag`. ([@koic][])
3 changes: 3 additions & 0 deletions config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ Rails/ContentTag:
Enabled: true
VersionAdded: '2.6'
VersionChanged: '2.12'
# This `Exclude` config prevents false positives for `tag` calls to `has_one: tag`. No helpers are used in normal models.
Exclude:
- app/models/**/*.rb

Rails/CreateTableWithTimestamps:
Description: >-
Expand Down

0 comments on commit 47f7993

Please sign in to comment.