forked from rubocop/rubocop-rails
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a false positive for
Rails/DynamicFindBy
Fixes rubocop/rubocop-jp#54 (Ja) This PR fixes a false positive for `Rails/DynamicFindBy` when not inheriting `ApplicationRecord` and without no receiver. A dynamic matcher without receiver is only possible if it inherits `ApplicationRecord` (`ActiveRecord::Base`). For example, Capybara's `find_by_id` and Token's `find_by_valid_token` should be accepted by default. - https://www.rubydoc.info/github/jnicklas/capybara/Capybara/Node/Finders#find_by_id-instance_method - https://github.com/fnando/tokens
- Loading branch information
Showing
3 changed files
with
47 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters