STI Problem


#1

Hi,

I’m having trouble with some STI Classes in a test.

When I create a new Class of an STI derived base class
the type column is not set.

If I do

object = DerivedClass.create!(params)

then object[:type] == nil for some reason.

Any ideas why this is so? I assumed rails takes
care of setting the type column in STI (that’s what I read).

Nico


#2

Ooops, solved it! Was a problem with a migration…