aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
diff options
context:
space:
mode:
authorbogdanvlviv <bogdanvlviv@gmail.com>2018-09-08 16:06:23 +0300
committerbogdanvlviv <bogdanvlviv@gmail.com>2018-09-09 16:00:28 +0300
commit0f905b9f592c1f3a15a67c778406f198e92e856a (patch)
treed4e8fc422728bba96829925d0c92e28b35bc7a53 /activerecord/CHANGELOG.md
parent4f05ba7f6b122a8020d229690344df71a8017021 (diff)
downloadrails-0f905b9f592c1f3a15a67c778406f198e92e856a.tar.gz
rails-0f905b9f592c1f3a15a67c778406f198e92e856a.tar.bz2
rails-0f905b9f592c1f3a15a67c778406f198e92e856a.zip
Fix explanation of `ActiveRecord::Base.configurations.configs_for` in the CHANGELOG
Since #33770 `#configs_for` changed method signature and it isn't supposed to work with a passed block.
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r--activerecord/CHANGELOG.md13
1 files changed, 7 insertions, 6 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index 09af076aa8..0af5b8caba 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -24,7 +24,7 @@
a deprecation warning if used, however calling `ActiveRecord::Base.configurations`
will use the new version internally and externally.
- For example, the following database.yml...
+ For example, the following `database.yml`:
```
development:
@@ -49,13 +49,14 @@
Iterating over the database configurations has also changed. Instead of
calling hash methods on the `configurations` hash directly, a new method `configs_for` has
- been provided that allows you to select the correct configuration. `env_name` is a required
- argument, `spec_name` is optional as well as passing a block. These return an array of
- database config objects for the requested environment and specification name respectively.
+ been provided that allows you to select the correct configuration. `env_name`, and
+ `spec_name` arguments are optional. For example these return an array of
+ database config objects for the requested environment and a single database config object
+ will be returned for the requested environment and specification name respectively.
```
- ActiveRecord::Base.configurations.configs_for("development")
- ActiveRecord::Base.configurations.configs_for("development", "primary")
+ ActiveRecord::Base.configurations.configs_for(env_name: "development")
+ ActiveRecord::Base.configurations.configs_for(env_name: "development", spec_name: "primary")
```
*Eileen M. Uchitelle*, *Aaron Patterson*