Permalink
Browse files

Fix gf in controllers

Closes #157.
  • Loading branch information...
1 parent 13b8bb5 commit 5a90ce43a5b6511a5544c2ceb0c55f84dd8a830c @tpope committed Apr 19, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 autoload/rails.vim
View
6 autoload/rails.vim
@@ -1964,8 +1964,10 @@ function! s:RailsFind()
if buffer.type_name('controller')
let contr = s:controller()
let view = s:findit('\s*\<def\s\+\(\k\+\)\>(\=','/\1')
- let res = s:findview(contr.'/'.view)
- if res != ""|return res|endif
+ if view !=# ''
+ let res = s:findview(contr.'/'.view)
+ if res != ""|return res|endif
+ endif
endif
let old_isfname = &isfname

0 comments on commit 5a90ce4

Please sign in to comment.