Forum: Ruby on Rails Active Record: subclassing a model

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Adam G. (Guest)
on 2006-03-31 15:37
Hi there,

I have a model

class Account < ActiveRecord::Base
  has_many: projects

The accounts table holds company information so as I created another
model to represent project partners thus:

class Partner < Account
  has_and_belongs_to_many :projects

#project.account pulls up the project owner and pulls
up all partners, including the owner.

Now, this all seems to work fine but every now and then I get the
following error message:

(eval):1:in `alias_method': undefined method `destroy_without_callbacks'
for class `Partner'


This error occured while loading the following files:

I can't figure out how to correct this. Any ideas?


Adam G.
Adam G. (Guest)
on 2006-03-31 16:03
I've just realised that I've moronically described single table
inheritance. The problem is still there though...
This topic is locked and can not be replied to.