configs_for
- 1.0.0
- 1.1.6
- 1.2.6
- 2.0.3
- 2.1.0
- 2.2.1
- 2.3.8
- 3.0.0
- 3.0.9
- 3.1.0
- 3.2.1
- 3.2.8
- 3.2.13
- 4.0.2
- 4.1.8
- 4.2.1
- 4.2.7
- 4.2.9
- 5.0.0.1
- 5.1.7
- 5.2.3
- 6.0.0 (0)
- 6.1.3.1 (11)
- 6.1.7.7 (0)
- 7.0.0 (38)
- 7.1.3.2 (-3)
- 7.1.3.4 (0)
- What's this?
configs_for(env_name: nil, spec_name: nil, include_replicas: false)
public
Collects the configs for the environment and optionally the specification name passed in. To include replica configurations pass include_replicas: true.
If a spec name is provided a single DatabaseConfig object will be returned, otherwise an array of DatabaseConfig objects will be returned that corresponds with the environment and type requested.
Options
-
env_name: The environment name. Defaults to nil which will collect configs for all environments.
-
spec_name: The specification name (i.e. primary, animals, etc.). Defaults to nil.
-
include_replicas: Determines whether to include replicas in the returned list. Most of the time we’re only iterating over the write connection (i.e. migrations don’t need to run for the write and read connection). Defaults to false.