From 85efb7cfe6dba1430e63f244a801c3a4c6b87f41 Mon Sep 17 00:00:00 2001 From: Abhay Nikam Date: Fri, 15 Feb 2019 00:33:36 +0530 Subject: Minor changes to deprecation warning message after 35242 --- activerecord/CHANGELOG.md | 4 ++-- activerecord/lib/active_record/database_configurations.rb | 6 +++--- .../lib/active_record/database_configurations/hash_config.rb | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'activerecord') diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 7b4f3c617c..47ae71f2a0 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -502,8 +502,8 @@ 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`, and - `spec_name` arguments are optional. For example these return an array of + 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. diff --git a/activerecord/lib/active_record/database_configurations.rb b/activerecord/lib/active_record/database_configurations.rb index 9879b01d3a..a6c702cbbc 100644 --- a/activerecord/lib/active_record/database_configurations.rb +++ b/activerecord/lib/active_record/database_configurations.rb @@ -25,9 +25,9 @@ module ActiveRecord # # Options: # - # env_name: The environment name. Defaults to nil which will collect + # env_name: The environment name. Defaults to +nil+ which will collect # configs for all environments. - # spec_name: The specification name (ie primary, animals, etc.). Defaults + # 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 @@ -189,7 +189,7 @@ module ActiveRecord ActiveRecord::Base.configurations = new_configs else - raise NotImplementedError, "`ActiveRecord::Base.configurations` in Rails 6 now returns an object instead of a hash. The #{method} method is not supported. Please use `configs_for` or consult the documentation for supported methods." + raise NotImplementedError, "`ActiveRecord::Base.configurations` in Rails 6 now returns an object instead of a hash. The `#{method}` method is not supported. Please use `configs_for` or consult the documentation for supported methods." end end diff --git a/activerecord/lib/active_record/database_configurations/hash_config.rb b/activerecord/lib/active_record/database_configurations/hash_config.rb index c176a62458..574cb6bf15 100644 --- a/activerecord/lib/active_record/database_configurations/hash_config.rb +++ b/activerecord/lib/active_record/database_configurations/hash_config.rb @@ -16,7 +16,7 @@ module ActiveRecord # # Options are: # - # :env_name - The Rails environment, ie "development" + # :env_name - The Rails environment, i.e. "development" # :spec_name - The specification name. In a standard two-tier # database configuration this will default to "primary". In a multiple # database three-tier database configuration this corresponds to the name -- cgit v1.2.3