We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 78afc89 commit 1e86f3eCopy full SHA for 1e86f3e
lib/ruby_lsp/ruby_lsp_rails/code_lens.rb
@@ -198,12 +198,12 @@ def add_jump_to_view(node)
198
.gsub("::", "/")
199
.downcase
200
201
- view_uris = Dir.glob("#{@client.rails_root}/app/views/#{controller_name}/#{action_name}*").map! do |path|
+ view_uris = Dir.glob("#{@client.rails_root}/app/views/#{controller_name}/#{action_name}*").filter_map do |path|
202
# it's possible we could have a directory with the same name as the action, so we need to skip those
203
next if File.directory?(path)
204
205
URI::Generic.from_path(path: path).to_s
206
- end.compact
+ end
207
208
return if view_uris.empty?
209
0 commit comments