diff options
Diffstat (limited to 'activerecord/lib/active_record')
-rwxr-xr-x | activerecord/lib/active_record/associations.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index f7c8e1d22f..56fe19a1db 100755 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -95,6 +95,12 @@ module ActiveRecord # * <tt>Project#categories.empty?, Project#categories.size, Project#categories, Project#categories<<(category1),</tt> # <tt>Project#categories.delete(category1)</tt> # + # === 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. + # # == Example # # link:files/examples/associations.png |