Skip to content

Commit 7206033

Browse files
committed
On Rails 5+, use rails as default 'makeprg'
1 parent 610834f commit 7206033

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

autoload/rails.vim

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1440,7 +1440,7 @@ endfunction
14401440

14411441
function! s:app_rake_command(...) dict abort
14421442
let cmd = 'rake'
1443-
if self.has_rails5() && get(a:, 1, '') !=# 'norails' && get(g:, 'rails_make', '') ==# 'rails'
1443+
if self.has_rails5() && get(a:, 1, '') !=# 'norails' && get(g:, 'rails_make', '') !=# 'rake'
14441444
let cmd = 'rails'
14451445
endif
14461446
if get(a:, 1, '') !=# 'static' && self.has_path('.zeus.sock') && executable('zeus')
@@ -5316,9 +5316,6 @@ function! rails#buffer_setup() abort
53165316
endif
53175317

53185318
compiler rails
5319-
if get(g:, 'rails_make', '') !=# 'rails'
5320-
let b:current_compiler = 'rake'
5321-
endif
53225319
let &l:makeprg = self.app().rake_command('static')
53235320
let &l:errorformat .= ',chdir '.escape(self.app().path(), ',')
53245321

doc/rails.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,8 @@ back out of any of the above commands.
291291
EXECUTABLE WRAPPERS *rails-exec*
292292

293293
Several commands are provided that wrap the `rails` and `rake` executables.
294-
Additionally, `rake` can be invoked directly with |:make| (or dispatch.vim's
295-
:Make).
294+
Additionally, `rails` (or `rake` on Rails versions older than 5) can be
295+
invoked directly with |:make| or dispatch.vim's :Make.
296296

297297
*rails-:Rails*
298298
:Rails {command} [options]

0 commit comments

Comments
 (0)