Skip to content

Commit 5f6c78e

Browse files
committed
Add task default for db/schema.rb
1 parent 2b00e06 commit 5f6c78e

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

autoload/rails.vim

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1369,6 +1369,8 @@ function! s:readable_default_rake_task(...) dict abort
13691369
endif
13701370
elseif self.name() =~# '\<db/seeds\.rb$'
13711371
return 'db:seed'
1372+
elseif self.name() =~# '\<db/'
1373+
return 'db:migrate:status'
13721374
elseif self.type_name('controller') && lnum
13731375
let lm = self.last_method(lnum)
13741376
if lm != ''
@@ -2835,7 +2837,7 @@ function! s:schemaEdit(cmd,...)
28352837
let schema = 'db/'.s:environment().'_structure.sql'
28362838
endif
28372839
endif
2838-
return s:findedit(cmd,schema.(a:0 ? '#'.a:1 : ''))
2840+
return s:findedit(cmd,schema.(a:0 && a:1 !=# '.' ? '#'.a:1 : ''))
28392841
endfunction
28402842

28412843
function! s:fixturesEdit(cmd,...)

compiler/rails.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ CompilerSet errorformat^=
3434
\Overwrite%.%#%\\S%\\+\ \ %#%m%\\x1b[0m\ \ %#%f,
3535
\%-GOverwrite%.%#\"h\"%.%#,
3636
\%+GCurrent\ version:%.%#,
37+
\%+G\ %#Status\ %#Migration\ ID%.%#,
3738
\%+G\ %#Prefix\ %#Verb%.%#,
3839
\%+G\ %#Code\ LOC:\ %.%#,
3940
\%+EUsage:%.%#,

0 commit comments

Comments
 (0)