Skip to content

Commit d227981

Browse files
committed
Ensure routes are loaded
1 parent b5f4791 commit d227981

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/ruby_lsp/ruby_lsp_rails/server.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ def resolve_route_info(requirements)
167167
if ActionDispatch::Routing::Mapper.respond_to?(:route_source_locations) &&
168168
ActionDispatch::Routing::Mapper.route_source_locations
169169
def route_location(name)
170+
::Rails.application.reload_routes_unless_loaded
170171
match_data = name.match(/^(.+)(_path|_url)$/)
171172
return { result: nil } unless match_data
172173

0 commit comments

Comments
 (0)