Skip to content

Avoid inspecting schema info for abstract classes #243

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 4, 2024

Conversation

gmcgibbon
Copy link
Member

Hovering on model classes like ApplicationRecord in a Rails application results
in raising an ActiveRecord::TableNotSpecifiedError, which we should be
accounting for.

Before:

Started GET "/ruby_lsp_rails/models/ApplicationRecord" for ::1 at 2024-02-03 08:15:12 -0600

ActiveRecord::TableNotSpecified (ApplicationRecord has no table configured. Set one with ApplicationRecord.table_name=):
...

After:

Started GET "/ruby_lsp_rails/models/ApplicationRecord" for ::1 at 2024-02-03 08:17:35 -0600

Hovering on model classes like ApplicationRecord in a Rails application results
in raising an ActiveRecord::TableNotSpecifiedError, which we should be
accounting for.

Before:
```
Started GET "/ruby_lsp_rails/models/ApplicationRecord" for ::1 at 2024-02-03 08:15:12 -0600

ActiveRecord::TableNotSpecified (ApplicationRecord has no table configured. Set one with ApplicationRecord.table_name=):
...
```

After:
```
Started GET "/ruby_lsp_rails/models/ApplicationRecord" for ::1 at 2024-02-03 08:17:35 -0600
```
@gmcgibbon gmcgibbon requested a review from a team as a code owner February 3, 2024 14:24
@gmcgibbon gmcgibbon requested review from andyw8 and Morriar February 3, 2024 14:24
Copy link
Member

@st0012 st0012 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@st0012 st0012 added the bugfix This PR fixes an existing bug label Feb 4, 2024
@st0012 st0012 merged commit 1e60034 into main Feb 4, 2024
@st0012 st0012 deleted the avoid_abstract_model_lookup branch February 4, 2024 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This PR fixes an existing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants