From b8608732f5329ce5a04fa31a5f6a5703c2162216 Mon Sep 17 00:00:00 2001 From: ydah <13041216+ydah@users.noreply.github.com> Date: Sun, 3 Sep 2023 18:29:17 +0900 Subject: [PATCH] Fix rubocop offense ```ruby lib/rubocop/cop/factory_bot/association_style.rb:251:21: C: [Corrected] InternalAffairs/RedundantMethodDispatchNode: Remove the redundant send_node. ancestor.send_node.method?(:factory) if ancestor.block_type? ``` --- lib/rubocop/cop/factory_bot/association_style.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rubocop/cop/factory_bot/association_style.rb b/lib/rubocop/cop/factory_bot/association_style.rb index 5ccd2441..7a483e5a 100644 --- a/lib/rubocop/cop/factory_bot/association_style.rb +++ b/lib/rubocop/cop/factory_bot/association_style.rb @@ -248,7 +248,7 @@ def options_for_autocorrect_to_implicit_style(node) def trait_within_trait?(node) factory_node = node.ancestors.reverse.find do |ancestor| - ancestor.send_node.method?(:factory) if ancestor.block_type? + ancestor.method?(:factory) if ancestor.block_type? end trait_name(factory_node).include?(node.method_name)