I'm getting a very strange error with DM 1.2 and a model that is sub-classed using single-table inheritance (STI):
undefined method `key' for Object:Class
That happens when I do a first
query on the base model "User" (User.first
) - however, queries on sub-classes of that class work fine (SuperAdmin.first, etc.)
The error occurs in dm-core: lib/dm-core/model.rb:588
I've tried several things including importing an old database, switching to an old branch of the code, etc. Nothing fixed it but one variation I got was:
undefined method `key' for NilClass:Class