提交 79f2f0b3 编写于 作者: K Kathleen McMahon 提交者: resource11

Issue 22240: adds link to list of instance methods [ci skip]

Update associations.rb

Update associations.rb

updates link to instance methods [ci skip]
上级 25673f47
......@@ -300,10 +300,10 @@ def association_instance_set(name, association)
#
# === A word of warning
#
# Don't create associations that have the same name as instance methods of
# ActiveRecord::Base. Since the association adds a method with that name to
# its model, it will override the inherited method and break things.
# For instance, +attributes+ and +connection+ would be bad choices for association names.
# Don't create associations that have the same name as [instance methods](http://api.rubyonrails.org/classes/ActiveRecord/Core.html) of
# <tt>ActiveRecord::Base</tt>. Since the association adds a method with that name to
# its model, using an association with the same name as one provided by <tt>ActiveRecord::Base</tt> will override the method inherited through <tt>ActiveRecord::Base</tt> and will break things.
# For instance, +attributes+ and +connection+ would be bad choices for association names, because those names already exist in the list of <tt>ActiveRecord::Base</tt> instance methods.
#
# == Auto-generated methods
# See also Instance Public methods below for more details.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册