rails

https://github.com/rails/rails

Ruby

Ruby on Rails

ActiveRecord::DatabaseConfigurations.config_for_env_and_spec

Selects the config for the specified environment and specification name

For example if passed :development, and :animals it will select the database
under the :development and :animals configuration level

Source | Google | Stack overflow

Edit

git clone [email protected]:rails/rails.git

cd rails

open activerecord/lib/active_record/database_configurations.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-ActiveRecord--DatabaseConfigurations-config_for_env_and_spec-for-pr


# Commit to git

git add activerecord/lib/active_record/database_configurations.rbgit commit -m "better docs for ActiveRecord::DatabaseConfigurations.config_for_env_and_spec"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-ActiveRecord--DatabaseConfigurations-config_for_env_and_spec-for-pr

hub pull-request


# Celebrate!