Skip to content

Commit f22e648

Browse files
committed
Fix :Rmigration with space in directory name
Closes tpope#164.
1 parent 8412c9b commit f22e648

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

autoload/rails.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2513,10 +2513,10 @@ function! s:app_migration(file) dict
25132513
let glob = '*'.rails#underscore(arg).'*rb'
25142514
endif
25152515
let files = split(glob(self.path('db/migrate/').glob),"\n")
2516-
if arg == ''
2516+
call map(files,'strpart(v:val,1+strlen(self.path()))')
2517+
if arg ==# ''
25172518
return get(files,-1,'')
25182519
endif
2519-
call map(files,'strpart(v:val,1+strlen(self.path()))')
25202520
let keep = get(files,0,'')
25212521
if glob =~# '^\*.*\*rb'
25222522
let pattern = glob[1:-4]

0 commit comments

Comments
 (0)