Skip to content

Commit

Permalink
[Fix rubocop#636] Fix a false positive for Rails/ContentTag
Browse files Browse the repository at this point in the history
Fixes rubocop#636.

This PR fixes a false positive for `Rails/ContentTag`
when using `tag` method in config/puma.rb.
  • Loading branch information
koic committed Feb 4, 2022
1 parent 7bbc675 commit 5995b4f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog/fix_a_false_positive_for_rails_content_tag.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* [#636](https://github.com/rubocop/rubocop-rails/issues/636): Fix a false positive for `Rails/ContentTag` when using `tag` method in config/puma.rb. ([@koic][])
5 changes: 4 additions & 1 deletion config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,12 @@ 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.
# This `Exclude` config prevents false positives for `tag` calls to `has_one: tag` and Puma configuration:
# https://puma.io/puma/Puma/DSL.html#tag-instance_method
# No helpers are used in normal models and configs.
Exclude:
- app/models/**/*.rb
- config/**/*.rb

Rails/CreateTableWithTimestamps:
Description: >-
Expand Down

0 comments on commit 5995b4f

Please sign in to comment.