rails/rails — pull request #13896 by laurocaetano (2014-01-31 01:26:12+00:00)
Title: Associations now raises `ArgumentError` on name conflicts.

It's an attempt to fix #13217.

In order to avoid unexpected behavior, dangerous association names should raise `ArgumentError`.

This way, models like this:
```ruby
class Project < ActiveRecord::Base
has_many :errors
end
# It was deleting all the errors when saving,
# because the valid? method calls errors.clear.
# see https://github.com/rails/rails/blob/master/activemodel/lib/active_model/validations.rb#L312-L314
```
Will raise `ArgumentError`, saying that the association name will generate an instance method which is already defined by `ActiveRecord::Base`.