Skip to content

Commit 24d076f

Browse files
committed
Handle trailing slash in rails#app()
1 parent 50cd463 commit 24d076f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

autoload/rails.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ function! rails#pluralize(word)
583583
endfunction
584584

585585
function! rails#app(...) abort
586-
let root = a:0 ? a:1 : get(b:, 'rails_root', '')
586+
let root = s:sub(a:0 ? a:1 : get(b:, 'rails_root', ''), '[\/]$', '')
587587
if !empty(root)
588588
if !has_key(s:apps, root) && filereadable(root . '/config/environment.rb')
589589
let s:apps[root] = deepcopy(s:app_prototype)

0 commit comments

Comments
 (0)