mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
5b96027ef6
Currently a developer can pass in a YAML configuration that fully specifies connection information: ``` production: database: triage_production adapter: password pool: 5 ``` They can also pass in a string that specifies a connection URL directly to an environment key: ``` production: postgresql://localhost/foo ``` This PR allows the use of both a connection url and specifying connection attributes via YAML through the use of the "url" sub key: ``` production: url: postgresql://localhost/foo pool: 3 ``` This will allow developers to inherit Active Record options such as `pool` from `&defaults` and still use a secure connection url such as `<%= ENV['DATABASE_URL'] %>`. The URL is expanded into a hash and then merged back into the YAML hash. If there are any conflicts, the values from the connection URL are preferred. Talked this over with @josevalim |
||
---|---|---|
.. | ||
adapters | ||
associations | ||
attribute_methods | ||
coders | ||
connection_adapters | ||
connection_specification | ||
fixture_set | ||
migration | ||
relation | ||
scoping | ||
tasks | ||
validations | ||
adapter_test.rb | ||
aggregations_test.rb | ||
ar_schema_test.rb | ||
associations_test.rb | ||
attribute_methods_test.rb | ||
autosave_association_test.rb | ||
base_test.rb | ||
batches_test.rb | ||
binary_test.rb | ||
bind_parameter_test.rb | ||
calculations_test.rb | ||
callbacks_test.rb | ||
clone_test.rb | ||
column_alias_test.rb | ||
column_definition_test.rb | ||
column_test.rb | ||
connection_management_test.rb | ||
connection_pool_test.rb | ||
core_test.rb | ||
counter_cache_test.rb | ||
custom_locking_test.rb | ||
database_statements_test.rb | ||
date_time_test.rb | ||
defaults_test.rb | ||
dirty_test.rb | ||
disconnected_test.rb | ||
dup_test.rb | ||
enum_test.rb | ||
explain_subscriber_test.rb | ||
explain_test.rb | ||
finder_respond_to_test.rb | ||
finder_test.rb | ||
fixtures_test.rb | ||
forbidden_attributes_protection_test.rb | ||
habtm_destroy_order_test.rb | ||
helper.rb | ||
hot_compatibility_test.rb | ||
i18n_test.rb | ||
inheritance_test.rb | ||
integration_test.rb | ||
invalid_connection_test.rb | ||
invalid_date_test.rb | ||
invertible_migration_test.rb | ||
json_serialization_test.rb | ||
locking_test.rb | ||
log_subscriber_test.rb | ||
migration_test.rb | ||
migrator_test.rb | ||
mixin_test.rb | ||
modules_test.rb | ||
multiparameter_attributes_test.rb | ||
multiple_db_test.rb | ||
nested_attributes_test.rb | ||
nested_attributes_with_callbacks_test.rb | ||
persistence_test.rb | ||
pooled_connections_test.rb | ||
primary_keys_test.rb | ||
query_cache_test.rb | ||
quoting_test.rb | ||
readonly_test.rb | ||
reaper_test.rb | ||
reflection_test.rb | ||
relation_test.rb | ||
relations_test.rb | ||
reload_models_test.rb | ||
result_test.rb | ||
sanitize_test.rb | ||
schema_dumper_test.rb | ||
serialization_test.rb | ||
serialized_attribute_test.rb | ||
statement_cache_test.rb | ||
store_test.rb | ||
test_case.rb | ||
timestamp_test.rb | ||
transaction_callbacks_test.rb | ||
transaction_isolation_test.rb | ||
transactions_test.rb | ||
unconnected_test.rb | ||
validations_repair_helper.rb | ||
validations_test.rb | ||
xml_serialization_test.rb | ||
yaml_serialization_test.rb |