Skip to content

Commit afbe19d

Browse files
committed
More robust :Rlog
Closes tpope#350.
1 parent 7ac6b0b commit afbe19d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

autoload/rails.vim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,15 +1016,15 @@ function! s:BufCommands()
10161016
endfunction
10171017

10181018
function! s:Log(bang,arg)
1019-
let lf = 'log/' . (empty(a:arg) ? s:environment() : a:arg) . '.log'
1019+
let lf = rails#app().path('log/' . (empty(a:arg) ? s:environment() : a:arg) . '.log')
10201020
if a:bang
1021-
exe "cgetfile ".lf
1021+
exe 'cgetfile' s:fnameescape(lf)
10221022
clast
10231023
else
10241024
if exists(":Tail") == 2
1025-
Tail `=rails#app().path(lf)`
1025+
exe 'Tail' lf
10261026
else
1027-
pedit `=rails#app().path(lf)`
1027+
exe 'pedit' lf
10281028
endif
10291029
endif
10301030
endfunction

0 commit comments

Comments
 (0)