Skip to content

Commit a28920a

Browse files
committed
Support a single string as a projection path
1 parent c21a508 commit a28920a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

autoload/rails.vim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4418,7 +4418,8 @@ function! s:SetBasePath()
44184418
let path += ['app/models/concerns', 'app/controllers/concerns', 'app/controllers', 'app/helpers', 'app/mailers', 'app/models']
44194419

44204420
for projection in values(self.app().projections())
4421-
if type(get(projection, 'path', 0)) == type([]) && !empty(projection.path)
4421+
let type = type(get(projection, 'path', 0))
4422+
if (type == type([]) || type == type('')) && !empty(projection.path)
44224423
for [prefix, suffix] in s:projection_pairs(projection)
44234424
let dir = matchstr(prefix, '.*/')
44244425
if !get(projection, 'check', 0) || self.app().has_path(dir)

0 commit comments

Comments
 (0)