Skip to content

Commit 2879350

Browse files
committed
Handle apps without ActiveRecord
1 parent ba16bf3 commit 2879350

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ruby_lsp/ruby_lsp_rails/server.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class Server
2929
sig { params(model_name: String).returns(T.nilable(T::Hash[Symbol, T.untyped])) }
3030
def resolve_database_info_from_model(model_name)
3131
const = ActiveSupport::Inflector.safe_constantize(model_name)
32-
unless const && const < ActiveRecord::Base && !const.abstract_class?
32+
unless const && defined?(ActiveRecord) && const < ActiveRecord::Base && !const.abstract_class?
3333
return {
3434
result: nil,
3535
}

0 commit comments

Comments
 (0)