Permalink
Browse files

Fix error with :Rcontroller without arguments

  • Loading branch information...
1 parent 506600d commit ef1e216dce05fd6572f2a1906a94fa9c20145efb @tpope committed Jan 3, 2008
Showing with 4 additions and 2 deletions.
  1. +4 −2 plugin/rails.vim
View
@@ -2208,9 +2208,11 @@ endfunction
function! s:controllerEdit(bang,cmd,...)
let suffix = '.rb'
- if a:0 == 0 && RailsFileType() =~ '^view\%(-layout\|-partial\)\@!'
+ if a:0 == 0
let controller = s:controller(1)
- let suffix = suffix.'#'.expand('%:t:r')
+ if RailsFileType() =~ '^view\%(-layout\|-partial\)\@!'
+ let suffix = suffix.'#'.expand('%:t:r')
+ endif
else
let controller = a:1
endif

0 comments on commit ef1e216

Please sign in to comment.