Polymorphic foreign key

Hey, in my app I have the similar model as one described in specs. AaT gem prevented me from creating new records. Here is my fix.