mirror of
https://github.com/meineerde/redmine.git
synced 2026-03-10 19:23:06 +00:00
Merged r21059 from trunk to 4.2-stable (#35435).
git-svn-id: http://svn.redmine.org/redmine/branches/4.2-stable@21405 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
7dff6698f8
commit
ac927b0217
3
Gemfile
3
Gemfile
@ -54,7 +54,8 @@ require 'erb'
|
||||
require 'yaml'
|
||||
database_file = File.join(File.dirname(__FILE__), "config/database.yml")
|
||||
if File.exist?(database_file)
|
||||
database_config = YAML::load(ERB.new(IO.read(database_file)).result)
|
||||
yaml_config = ERB.new(IO.read(database_file)).result
|
||||
database_config = YAML.respond_to?(:unsafe_load) ? YAML.unsafe_load(yaml_config) : YAML.load(yaml_config)
|
||||
adapters = database_config.values.map {|c| c['adapter']}.compact.uniq
|
||||
if adapters.any?
|
||||
adapters.each do |adapter|
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user