Skip to content

Commit 9d00978

Browse files
committed
Add docker support
1 parent ae1215d commit 9d00978

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

autoload/rails.vim

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -862,6 +862,7 @@ function! s:app_has(feature) dict
862862
\'test': 'test/',
863863
\'spec': 'spec/',
864864
\'bundler': 'Gemfile|gems.locked',
865+
\'docker': 'docker-compose.yml',
865866
\'rails2': 'script/about',
866867
\'rails3': 'config/application.rb',
867868
\'rails5': 'app/assets/config/manifest.js|config/initializers/application_controller_renderer.rb',
@@ -907,7 +908,9 @@ function! s:app_ruby_script_command(cmd) dict abort
907908
endfunction
908909

909910
function! s:app_static_rails_command(cmd) dict abort
910-
if self.has_path('bin/rails')
911+
if self.has('docker')
912+
let cmd = 'docker-compose run web rails '.a:cmd
913+
elseif self.has_path('bin/rails')
911914
let cmd = 'bin/rails '.a:cmd
912915
elseif self.has_path('script/rails')
913916
let cmd = 'script/rails '.a:cmd

0 commit comments

Comments
 (0)