Skip to content

Commit

Permalink
Merge pull request #637 from koic/fix_a_false_positive_for_rails_cont…
Browse files Browse the repository at this point in the history
…ent_tag

[Fix #636] Fix a false positive for `Rails/ContentTag`
  • Loading branch information
koic authored Feb 19, 2022
2 parents 24560e7 + 5995b4f commit da9d225
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 @@ -205,9 +205,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 da9d225

Please sign in to comment.