fix: remove rubocop rule (#8985)

* fix: remove rubocop rule

* chore: remove ignore comment

* chore: remove ignore comment
This commit is contained in:
Shivam Mishra
2024-02-22 13:36:15 +05:30
committed by GitHub
parent a5e9cd94e1
commit 106319406b
4 changed files with 0 additions and 25 deletions

View File

@@ -1,16 +0,0 @@
require 'rubocop'
# Enforces use of from_email for email attribute lookups
class UseFromEmail < RuboCop::Cop::Cop
MSG = 'Use `from_email` for email lookups to ensure case insensitivity.'.freeze
def_node_matcher :find_by_email?, <<~PATTERN
(send _ :find_by (hash (pair (sym :email) _)))
PATTERN
def on_send(node)
return unless find_by_email?(node)
add_offense(node, message: MSG)
end
end