aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/database_configurations.rb
diff options
context:
space:
mode:
authorbogdanvlviv <bogdanvlviv@gmail.com>2018-09-08 16:20:17 +0300
committerbogdanvlviv <bogdanvlviv@gmail.com>2018-09-09 16:11:51 +0300
commit0a6aa42e029a18fb6aebd40da7eb33bcb39614b4 (patch)
tree634c5c7632561e1249f774cd18e06fd68cfdb4b3 /activerecord/lib/active_record/database_configurations.rb
parent0f905b9f592c1f3a15a67c778406f198e92e856a (diff)
downloadrails-0a6aa42e029a18fb6aebd40da7eb33bcb39614b4.tar.gz
rails-0a6aa42e029a18fb6aebd40da7eb33bcb39614b4.tar.bz2
rails-0a6aa42e029a18fb6aebd40da7eb33bcb39614b4.zip
Fix `ActiveRecord::DatabaseConfigurations`'s docs
Diffstat (limited to 'activerecord/lib/active_record/database_configurations.rb')
-rw-r--r--activerecord/lib/active_record/database_configurations.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/database_configurations.rb b/activerecord/lib/active_record/database_configurations.rb
index a94f46d07f..9aabde676a 100644
--- a/activerecord/lib/active_record/database_configurations.rb
+++ b/activerecord/lib/active_record/database_configurations.rb
@@ -18,8 +18,8 @@ module ActiveRecord
# 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 DatabaseConfiguration object will be
- # returned, otherwise an array of DatabaseConfiguration objects will be
+ # 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:
@@ -53,7 +53,7 @@ module ActiveRecord
# Returns the config hash that corresponds with the environment
#
# If the application has multiple databases `default_hash` will
- # the first config hash for the environment.
+ # return the first config hash for the environment.
#
# { database: "my_db", adapter: "mysql2" }
def default_hash(env = ActiveRecord::ConnectionHandling::DEFAULT_ENV.call.to_s)
@@ -64,7 +64,7 @@ module ActiveRecord
# Returns a single DatabaseConfig object based on the requested environment.
#
- # If the application has multiple databases `select_db_config` will return
+ # If the application has multiple databases `find_db_config` will return
# the first DatabaseConfig for the environment.
def find_db_config(env)
configurations.find do |db_config|
@@ -73,7 +73,7 @@ module ActiveRecord
end
end
- # Returns the DatabaseConfig object as a Hash.
+ # Returns the DatabaseConfigurations object as a Hash.
def to_h
configs = configurations.reverse.inject({}) do |memo, db_config|
memo.merge(db_config.to_legacy_hash)