class Rails::Application::Configuration
def load_database_yaml # :nodoc:
tags and load the database.yml for the rake tasks.
This uses a DummyERB custom compiler so YAML can ignore the ERB
method.
configuration values or loading the environment. Do not use this
create the rake tasks for multiple databases without filling in the
Load the database YAML without evaluating ERB. This allows us to
def load_database_yaml # :nodoc: if path = paths["config/database"].existent.first require "rails/application/dummy_erb_compiler" yaml = DummyERB.new(Pathname.new(path).read).result if YAML.respond_to?(:unsafe_load) YAML.unsafe_load(yaml) || {} else YAML.load(yaml) || {} end else {} end end