Skip to content

Commit 37e882f

Browse files
committed
Suppress a RuboCop offense
Follow up to rubocop/rubocop#10312. This commit suppresses the following RuboCop offense. ```console % bundle exec rubocop -a (snip) lib/rubocop/cop/rails/http_positional_arguments.rb:70:87: C: [Corrected] InternalAffairs/RedundantMethodDispatchNode: Remove the redundant send_node. !!node.each_ancestor(:block).detect { |block| ROUTING_METHODS.include?(block.send_node.method_name) } ^^^^^^^^^^ 227 files inspected, 1 offense detected, 1 offense corrected ```
1 parent 5b230e5 commit 37e882f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rubocop/cop/rails/http_positional_arguments.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def on_send(node)
6767
private
6868

6969
def in_routing_block?(node)
70-
!!node.each_ancestor(:block).detect { |block| ROUTING_METHODS.include?(block.send_node.method_name) }
70+
!!node.each_ancestor(:block).detect { |block| ROUTING_METHODS.include?(block.method_name) }
7171
end
7272

7373
def needs_conversion?(data)

0 commit comments

Comments
 (0)