Skip to content

Through go to definition response returns the definition of the association instead of the through association #676

@bart-westenenk-bex

Description

@bart-westenenk-bex

The following code snippet has a go to definition response on the :bar symbol in has_one :baz, through: :bar. It returns with the class location of baz, while I would expect to either got to the belongs_to :bar definition or the has_one :baz definition in Bar.

class Foo < ActiveRecord::Base
  belongs_to :bar
  has_one :baz, through: :bar
end

class Bar < ActiveRecord::Base
  has_one :foo
  has_one :baz
end

class Baz < ActiveRecord::Base
  belongs_to :bar
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions