[LRUG] Base class for model
ollylegg at gmail.com
Fri Sep 11 08:20:11 PDT 2009
Yes, this is supported.
self.abstract_class = true
class MySubClass < MyBaseClass
On 11 Sep 2009, at 16:17, Simon Sebright wrote:
> I was attempting to do a bit of refactoring. I had one model class,
> in which I had defined a few operations. Then along came a second
> one, where I wanted the same operations, so I started to create a
> common base class for them, which naturally inherits from
> Now, I get all sorts of errors, and it looks like rails is taking
> the base class name and assuming it'll find a table relating to it,
> which in my case it won't.
> Is this somehow supported, or should I be using a module/mixin
> Chat mailing list
> Chat at lists.lrug.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Chat