提交 906b1c45 编写于 作者: R Ryuta Kamizono

Clarify the difference between (old) `spec_name` and `connection_specification_name`

[ci skip]
上级 63316b7b
......@@ -996,7 +996,7 @@ def checkout_and_verify(c)
# should use.
#
# The ConnectionHandler class is not coupled with the Active models, as it has no knowledge
# about the model. The model needs to pass a specification name to the handler,
# about the model. The model needs to pass a connection specification name to the handler,
# in order to look up the correct connection pool.
class ConnectionHandler
FINALIZER = lambda { |_| ActiveSupport::ForkTracker.check! }
......
......@@ -209,7 +209,7 @@ def connection
attr_writer :connection_specification_name
# Return the specification name from the current class or its parent.
# Return the connection specification name from the current class or its parent.
def connection_specification_name
if !defined?(@connection_specification_name) || @connection_specification_name.nil?
return self == Base ? Base.name : superclass.connection_specification_name
......
......@@ -30,7 +30,7 @@ def initialize(configurations = {})
#
# * <tt>env_name:</tt> The environment name. Defaults to +nil+ which will collect
# configs for all environments.
# * <tt>name:</tt> The db name name (i.e. primary, animals, etc.). Defaults
# * <tt>name:</tt> The db config name (i.e. primary, animals, etc.). Defaults
# to +nil+. If no +env_name+ is specified the config for the default env and the
# passed +name+ will be returned.
# * <tt>include_replicas:</tt> Determines whether to include replicas in
......
......@@ -17,7 +17,7 @@ class DatabaseConfigurations
# ==== Options
#
# * <tt>:env_name</tt> - The Rails environment, i.e. "development".
# * <tt>:name</tt> - The specification name. In a standard two-tier
# * <tt>:name</tt> - The db config 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
# used in the second tier, for example "primary_readonly".
......
......@@ -20,7 +20,7 @@ class DatabaseConfigurations
# ==== Options
#
# * <tt>:env_name</tt> - The Rails environment, ie "development".
# * <tt>:name</tt> - The specification name. In a standard two-tier
# * <tt>:name</tt> - The db config 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
# used in the second tier, for example "primary_readonly".
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册