Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix error with :Rcontroller without arguments

  • Loading branch information...
commit ef1e216dce05fd6572f2a1906a94fa9c20145efb 1 parent 506600d
@tpope authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 plugin/rails.vim
View
6 plugin/rails.vim
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.