Skip to content

Commit 9ec44f4

Browse files
committed
Merge pull request tpope#365 from teoljungberg/patch-1
Try `bin/rails` before `script/rails`
2 parents fda0d5b + 9bc5057 commit 9ec44f4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

autoload/rails.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -899,12 +899,12 @@ endfunction
899899
function! s:app_prepare_rails_command(cmd) dict abort
900900
if self.has_path('.zeus.sock') && a:cmd =~# '^\%(console\|dbconsole\|destroy\|generate\|server\|runner\)\>'
901901
return 'zeus '.a:cmd
902+
elseif self.has_path('bin/rails')
903+
let cmd = 'bin/rails '.a:cmd
902904
elseif self.has_path('script/rails')
903905
let cmd = 'script/rails '.a:cmd
904906
elseif self.has_path('script/' . matchstr(a:cmd, '\w\+'))
905907
let cmd = 'script/'.a:cmd
906-
elseif self.has_path('bin/rails')
907-
let cmd = 'bin/rails '.a:cmd
908908
elseif self.has('bundler')
909909
return 'bundle exec rails ' . a:cmd
910910
else

0 commit comments

Comments
 (0)