Error message: ActiveRecord::SubclassNotFound: The single-table
inheritance mechanism failed to locate the subclass:
‘Transactions::DummyDdnlTransaction’. This error is raised because the
column ‘type’ is reserved for storing the class in case of
inheritance. Please rename this column if you didn’t intend it to be
used for storing the inheritance class or overwrite
Transactions::DummyDdnlTransaction.inheritance_column to use another
column for that information.
Have Googled around, tried solutions like self.subclasses and
require_dependency but they didn’t work for me.
On Friday, 8 June 2012 21:08:18 UTC-4, Commander J. wrote:
‘Transactions::DummyDdnlTransaction’. This error is raised because the
column ‘type’ is reserved for storing the class in case of
inheritance. Please rename this column if you didn’t intend it to be
used for storing the inheritance class or overwrite
Transactions::DummyDdnlTransaction.inheritance_column to use another
column for that information.
Have Googled around, tried solutions like self.subclasses and
require_dependency but they didn’t work for me.
The autoloader is expecting to find Transactions::DummyDdnlTransaction
in
app/models/transactions/dummy_ddnl_transaction.rb - according to the
Gist,
you’ve got the file in the top level of app/models. Either move it, or
manually require it.
–Matt J.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.