Commit a1cad13b authored by Jacopo's avatar Jacopo

Fixes rubocop chain ordinary method after safe navigation operator

parent c6bddeac
...@@ -48,12 +48,15 @@ module RuboCop ...@@ -48,12 +48,15 @@ module RuboCop
private private
def extends_activesupport_concern?(node) def extends_activesupport_concern?(node)
container_module(node.parent)&.descendants.any? do |descendant| container_module = container_module_of(node.parent)
return false unless container_module
container_module.descendants.any? do |descendant|
extend_activesupport_concern?(descendant) extend_activesupport_concern?(descendant)
end end
end end
def container_module(node) def container_module_of(node)
node = node.parent until node.type == :module node = node.parent until node.type == :module
node node
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment