From 5995b4ffe09e876b85c01ac2c4a6bc01b0e631de Mon Sep 17 00:00:00 2001 From: Koichi ITO Date: Fri, 4 Feb 2022 11:22:09 +0900 Subject: [PATCH] [Fix #636] Fix a false positive for `Rails/ContentTag` Fixes #636. This PR fixes a false positive for `Rails/ContentTag` when using `tag` method in config/puma.rb. --- changelog/fix_a_false_positive_for_rails_content_tag.md | 1 + config/default.yml | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 changelog/fix_a_false_positive_for_rails_content_tag.md diff --git a/changelog/fix_a_false_positive_for_rails_content_tag.md b/changelog/fix_a_false_positive_for_rails_content_tag.md new file mode 100644 index 0000000000..0aa92f714f --- /dev/null +++ b/changelog/fix_a_false_positive_for_rails_content_tag.md @@ -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][]) diff --git a/config/default.yml b/config/default.yml index 446672b277..54e74f58f6 100644 --- a/config/default.yml +++ b/config/default.yml @@ -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: >-