rails
https://github.com/rails/rails
Ruby
Ruby on Rails
Rails::Application::Configuration#load_database_yaml
Loads the database YAML without evaluating ERB. People seem to write ERB that makes the database configuration depend on Rails configuration. But we want Rails configuration (specifically `rake` and `rails` tasks) to be generated based on information in the database yaml, so we need a method that loads the database yaml *without* the context of the Rails application.
Edit
git clone [email protected]:rails/rails.git
cd rails
open railties/lib/rails/application/configuration.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Rails--Application--Configuration-load_database_yaml-for-pr
# Commit to gitgit add railties/lib/rails/application/configuration.rbgit commit -m "better docs for Rails::Application::Configuration#load_database_yaml"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Rails--Application--Configuration-load_database_yaml-for-pr
hub pull-request
# Celebrate!