The single-table inheritance mechanism failed to locate the subclass rails

Recently I tried to create a rails model with a column called “type” and I got the following error

The single-table inheritance mechanism failed to locate the subclass.

Turns out, active record assumes that a ‘type’ field is to indicate single table inheritance. But that wasn’t my intent.
So, here’s the line I added to my model that was raising the error.

self.inheritance_column = nil

Ryan Sukale

Ryan is just a regular guy next door trying to manage his life and finances.

You may also like...