rails/rails — pull request #15343 by dontfidget (2014-05-26 19:01:07+00:00)
Title: prevent bad automatic inverse_of association

This should fix #15337. The problem is that the automatic inverse_of code ignores the "as" code and can accidentally reflect on the wrong assocation and fail to determine the the association is polymorphic. If the model with a polymorphic belongs_to association also has a non-polymorphic assocation to the same class it will reflect on that association.