From: 7stud -- Date: 2011-08-26T11:37:52+09:00 Subject: Re: calling a descendant's method Alexey Muranov wrote in post #1018529: > In fact, i've got a problem in Rails with an abstract class > > class AbstractSmartModel < ActiveRecord::Base > self.abstract_class = true > ... > end > Inside a class, but outside any method definitions, self equals the class. So the line: self.abstract_class = true is equivalent to: AbstractSmartModel.abstract_class = true > I've got an error "Could not find table 'abstract_smarter_models' ". > I don't know what that indicates. > I thought that one of the descendants called a method of > AbstractSmartModel > which called another method that only a non-abstract class could have, > but apparently i was wrong. > I'll try to debug this, sorry for bad question. > > UPDATE: the error is raised by a call to > columns_hash inside of a class method of the abstract class. > Do not understand. -- Posted via http://www.ruby-forum.com/.