Join GitHub today
Singularize and capitalize polymorphic types #1615
Singularizing polymorphic association types allows you to use plural or singular
Because ActiveRecord calls #constantize on the polymorphic association type
As I looked into it more, I realized the error only gets thrown when you validate the relationship is present. The fix doesn't cause any of the other tests to fail, so I assume it's ok.
I added a test, but I'm sure it's not the best implementation because I don't use Minitest and the organization of the tests is a bit difficult to discern at first glance.