mardi 7 mars 2017

Minitest: table empty when using STI

I had a single-table inheritance data model, where CityPage < Destination. This worked fine.

Now that I have added a second type CountryPage < Destination, my tests fail. Specifically, CityPage.all returns an empty result even though I have CityPage fixtures (which have not been changed & worked perfectly before).

What am I doing wrong? Why is my test data not being generated?

Aucun commentaire:

Enregistrer un commentaire