提交 98360a96 编写于 作者: R Ryuta Kamizono 提交者: GitHub

Fix outdated comment for `Core::ClassMethods#===` [ci skip] (#30146)

This comment was added at 97849deb, but `AssociationProxy` and
`test_triple_equality` was removed at 1644663b. Currently the `===` is
used for `test_decorated_polymorphic_where` that added at #11945.
So I updated "association proxies" to "decorated models".

And also, currently `Core::ClassMethods` appears in the doc.

http://api.rubyonrails.org/classes/ActiveRecord/Core/ClassMethods.html

But it looks like that the methods in the module is not public API.
So I also added `# :nodoc:` to the module.
上级 615998c4
......@@ -143,7 +143,7 @@ def self.connection_handler=(handler)
self.default_connection_handler = ConnectionAdapters::ConnectionHandler.new
end
module ClassMethods
module ClassMethods # :nodoc:
def allocate
define_attribute_methods
super
......@@ -251,7 +251,7 @@ def inspect
end
end
# Overwrite the default class equality method to provide support for association proxies.
# Overwrite the default class equality method to provide support for decorated models.
def ===(object)
object.is_a?(self)
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册