rails/rails — pull request #4224 by alexeymuranov (2011-12-28 22:19:40+00:00)
Title: Fix #2572 and define fixture table name in the associated model

This is an extension of #3844.

I addition to fixing issue #2572, here i make fixtures to take the table name from the associated model by calling `table_name` method on that class, whenever the class respond to this. This change mostly affects `Fixtures#initialize`.

Before, the way of determining the table name was somewhat random and depended on whether the model class was passed as a class or as its name (string). Also, `Fixtures#initialize` looked bad to me.