On Sep 13, 11:15 am, Javier Ruiz <jr...@javiruiz.org> wrote: > Ok, then maybe I didn't ask properly... you are right it's not STI what > I'm trying to do, but I'll try to explain it better. >
> What I need is just to extend a base class (wich is a model with its db > table and all activerecord logic) with another class (a subclass with > its own table and all activerecord logic, plus the parent methods, > properties and so on). I tried to do it like I mentioned in my first > email, but when the child class (the extended class) has a fk to another > table, rails tries to find the fk in the parent class, not in the > extended class, like the example I posted before: > Rails doesn't do that - either the parent class is abstract (ie has no table) or you get STI. You might have better look putting the common functionality in a module, or having an abstract class which is the parent of your 2 concrete classes. Fred -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.