diff options
author | Arthur Nogueira Neves <github@arthurnn.com> | 2016-05-29 19:50:22 -0400 |
---|---|---|
committer | Arthur Nogueira Neves <github@arthurnn.com> | 2016-05-29 19:50:22 -0400 |
commit | 3f2e83d964fcb4cd7f7f2ed8fb2b2592ffc57647 (patch) | |
tree | 63b76329b89c79e75869bc1294bb7060e5ddb8ca /activerecord | |
parent | ff63bb8231b7d3c03538d378440187832ea53b22 (diff) | |
parent | 79f2f0b3cfd455a3cda98f8914a229ef0664dd3f (diff) | |
download | rails-3f2e83d964fcb4cd7f7f2ed8fb2b2592ffc57647.tar.gz rails-3f2e83d964fcb4cd7f7f2ed8fb2b2592ffc57647.tar.bz2 rails-3f2e83d964fcb4cd7f7f2ed8fb2b2592ffc57647.zip |
Merge pull request #22240 from resource11/resource11-patch-1
Requesting documentation update
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/associations.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index 5a973fa801..ec9b073c18 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 + # <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. |