File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ def call(env)
31
31
def resolve_database_info_from_model ( model_name )
32
32
const = ActiveSupport ::Inflector . safe_constantize ( model_name )
33
33
34
- if const && const < ActiveRecord ::Base
34
+ if const && const < ActiveRecord ::Base && ! const . abstract_class?
35
35
begin
36
36
schema_file = ActiveRecord ::Tasks ::DatabaseTasks . schema_dump_path ( const . connection . pool . db_config )
37
37
rescue => e
Original file line number Diff line number Diff line change @@ -35,6 +35,11 @@ class RackAppTest < ActionDispatch::IntegrationTest
35
35
assert_response ( :not_found )
36
36
end
37
37
38
+ test "GET show returns not_found if class is an abstract model" do
39
+ get "/ruby_lsp_rails/models/ApplicationRecord"
40
+ assert_response ( :not_found )
41
+ end
42
+
38
43
test "GET activate returns success to display that server is running" do
39
44
get "/ruby_lsp_rails/activate"
40
45
assert_response ( :success )
You can’t perform that action at this time.
0 commit comments