Skip to content

Commit 0066b35

Browse files
committed
[Fix #1058] Relax Include path for Rails/FindBy and Rails/FindEach
Fixes #1058. This PR relaxes `Include` path for `Rails/FindBy` and `Rails/FindEach`. `Rails/FindBy` was introduced in rubocop/rubocop@6188d75. This was before it was extracted to RuboCop Rails, which is probably why it was targeting `app/models`. So, RuboCop Rails targeting Rails would not need it. `Rails/FindEach` is the same: rubocop/rubocop@f2e26812
1 parent 34376e0 commit 0066b35

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* [#1058](https://github.com/rubocop/rubocop-rails/issues/1058): Relax `Include` path for `Rails/FindBy` and `Rails/FindEach`. ([@koic][])

config/default.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -463,10 +463,8 @@ Rails/FindBy:
463463
StyleGuide: 'https://rails.rubystyle.guide#find_by'
464464
Enabled: true
465465
VersionAdded: '0.30'
466-
VersionChanged: '2.11'
466+
VersionChanged: '<<next>>'
467467
IgnoreWhereFirst: true
468-
Include:
469-
- app/models/**/*.rb
470468

471469
Rails/FindById:
472470
Description: >-
@@ -482,9 +480,7 @@ Rails/FindEach:
482480
Enabled: true
483481
Safe: false
484482
VersionAdded: '0.30'
485-
VersionChanged: '2.19'
486-
Include:
487-
- app/models/**/*.rb
483+
VersionChanged: '<<next>>'
488484
AllowedMethods:
489485
# Methods that don't work well with `find_each`.
490486
- order

0 commit comments

Comments
 (0)