Skip to content

Commit 3df6a98

Browse files
authored
Merge pull request #263 from Shopify/andyw8/handle-apps-without-activerecord
Handle apps without ActiveRecord
2 parents 618d267 + 2879350 commit 3df6a98

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)