Skip to content

Commit 875c42b

Browse files
author
Filip Sučić
committed
Fixed handle_association go to definition by adding a guard
1 parent 0e56a20 commit 875c42b

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

lib/ruby_lsp/ruby_lsp_rails/definition.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ def handle_validation(node, call_node, arguments)
129129
def handle_association(node)
130130
first_argument = node.arguments&.arguments&.first
131131
return unless first_argument.is_a?(Prism::SymbolNode)
132+
return unless first_argument.eql?(node)
132133

133134
association_name = first_argument.unescaped
134135

0 commit comments

Comments
 (0)