File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -4008,20 +4008,22 @@ function! s:app_dbext_settings(environment) dict
40084008 return cache[a: environment ]
40094009endfunction
40104010
4011- function ! s: BufDatabase (... )
4011+ function ! s: BufDatabase (level , ... )
40124012 if exists (" s:lock_database" ) || ! exists (' g:loaded_dbext' ) || ! exists (' b:rails_root' )
40134013 return
40144014 endif
40154015 let self = rails#app ()
4016- if ( a: 0 && a: 1 > 1 )
4016+ if a: level > 1
40174017 call self .cache.clear (' dbext_settings' )
4018+ elseif exists (' g:rails_no_dbext' )
4019+ return
40184020 endif
4019- if (a: 0 > 1 && a: 2 != ' ' )
4020- let env = a: 2
4021+ if (a: 0 && ! empty ( a: 1 ) )
4022+ let env = a: 1
40214023 else
40224024 let env = s: environment ()
40234025 endif
4024- if (! self .cache.has (' dbext_settings' ) || ! has_key (self .cache.get (' dbext_settings' ),env)) && ( a: 0 ? a: 1 : 0 ) <= 0
4026+ if (! self .cache.has (' dbext_settings' ) || ! has_key (self .cache.get (' dbext_settings' ),env)) && a: level <= 0
40254027 return
40264028 endif
40274029 let dict = self .dbext_settings (env)
You can’t perform that action at this time.
0 commit comments