From 79f2f0b3cfd455a3cda98f8914a229ef0664dd3f Mon Sep 17 00:00:00 2001 From: Kathleen McMahon Date: Mon, 9 Nov 2015 15:18:02 -0500 Subject: Issue 22240: adds link to list of instance methods [ci skip] Update associations.rb Update associations.rb updates link to instance methods [ci skip] --- activerecord/lib/active_record/associations.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'activerecord/lib/active_record') diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index b806a2f832..ef35d80523 100644 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -300,10 +300,10 @@ module ActiveRecord # # === 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 + # ActiveRecord::Base. Since the association adds a method with that name to + # its model, using an association with the same name as one provided by ActiveRecord::Base will override the method inherited through ActiveRecord::Base 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 ActiveRecord::Base instance methods. # # == Auto-generated methods # See also Instance Public methods below for more details. -- cgit v1.2.3