Displaying 1 result from an estimated 1 matches for "abstractclass2".
Did you mean:
abstractclass
2011 Dec 03
1
ActiveRecord Abstract class
Hi, I was trying to create an abstract class and a subclass which
inherit that abstract class.
However, seems like I cannot instantiate the subclass too. Below is my
code:
//abstractclass2.rb
class Abstractclass2 < ActiveRecord::Base
self.abstract_class = true
end
//subclass.rb
class Subclass < Abstractclass2
end
When I test drive it in rails console, I got the following error:
from (irb):1irb(main):002:0> sb = Subclass.new
ActiveRecord::StatementInvalid: Could...