Skip to content

Commit 5a90ce4

Browse files
committed
Fix gf in controllers
Closes tpope#157.
1 parent 13b8bb5 commit 5a90ce4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

autoload/rails.vim

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1964,8 +1964,10 @@ function! s:RailsFind()
19641964
if buffer.type_name('controller')
19651965
let contr = s:controller()
19661966
let view = s:findit('\s*\<def\s\+\(\k\+\)\>(\=','/\1')
1967-
let res = s:findview(contr.'/'.view)
1968-
if res != ""|return res|endif
1967+
if view !=# ''
1968+
let res = s:findview(contr.'/'.view)
1969+
if res != ""|return res|endif
1970+
endif
19691971
endif
19701972

19711973
let old_isfname = &isfname

0 commit comments

Comments
 (0)