Skip to content

Commit ee53e83

Browse files
rtlechowtpope
authored andcommitted
Add support for app_db_url with nested config
In the case of a database.yml with nested configuration, e.g. ```yaml development: variables: sql_mode: NO_AUTO_CREATE_USER ``` ignore nested values, like `dbconsole` does.
1 parent 2c42236 commit ee53e83

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

autoload/rails.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4206,6 +4206,7 @@ function! s:app_db_url(...) dict abort
42064206
endif
42074207
endif
42084208
if !empty(config)
4209+
call filter(config, 'type(v:val) != type([]) && type(v:val) != type({})')
42094210
let url .= '?' . join(map(items(config), 'v:val[0]."=".s:url_encode(v:val[1])'), '&')
42104211
endif
42114212
return url

0 commit comments

Comments
 (0)