Commit 8302c8e9 authored by jplang's avatar jplang
Browse files

Parse database.yml with erb (#13004).

git-svn-id: e93f8b46-1217-0410-a6f0-8f06a7374b81
parent efed7fbe
......@@ -36,9 +36,10 @@ end
# Include database gems for the adapters found in the database
# configuration file
require 'erb'
database_file = File.join(File.dirname(__FILE__), "config/database.yml")
if File.exist?(database_file)
database_config = YAML.load_file(database_file)
database_config = YAML::load(
adapters = {|c| c['adapter']}.compact.uniq
if adapters.any?
adapters.each do |adapter|
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment