Skip to content

Commit 2c92a7a

Browse files
committed
Don't require detected gem to be actually installed
1 parent 5cac1af commit 2c92a7a

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

autoload/rails.vim

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4256,8 +4256,6 @@ function! s:app_gems() dict abort
42564256
let project = bundler#project(self.path())
42574257
if has_key(project, 'paths')
42584258
return project.paths()
4259-
elseif has_key(project, 'gems')
4260-
return project.gems()
42614259
endif
42624260
endif
42634261
return {}
@@ -4266,11 +4264,7 @@ endfunction
42664264
function! s:app_has_gem(gem) dict abort
42674265
if self.has('bundler') && exists('*bundler#project')
42684266
let project = bundler#project(self.path())
4269-
if has_key(project, 'has')
4270-
return project.has(a:gem)
4271-
elseif has_key(project, 'gems')
4272-
return has_key(bundler#project(self.path()).gems(), a:gem)
4273-
endif
4267+
return has_key(project, 'versions') && has_key(project.versions(), a:gem)
42744268
else
42754269
return 0
42764270
endif

0 commit comments

Comments
 (0)