Skip to content

Commit da9d225

Browse files
authored
Merge pull request #637 from koic/fix_a_false_positive_for_rails_content_tag
[Fix #636] Fix a false positive for `Rails/ContentTag`
2 parents 24560e7 + 5995b4f commit da9d225

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
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][])

config/default.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,12 @@ Rails/ContentTag:
205205
Enabled: true
206206
VersionAdded: '2.6'
207207
VersionChanged: '2.12'
208-
# This `Exclude` config prevents false positives for `tag` calls to `has_one: tag`. No helpers are used in normal models.
208+
# This `Exclude` config prevents false positives for `tag` calls to `has_one: tag` and Puma configuration:
209+
# https://puma.io/puma/Puma/DSL.html#tag-instance_method
210+
# No helpers are used in normal models and configs.
209211
Exclude:
210212
- app/models/**/*.rb
213+
- config/**/*.rb
211214

212215
Rails/CreateTableWithTimestamps:
213216
Description: >-

0 commit comments

Comments
 (0)