Displaying 1 result from an estimated 1 matches for "1irb".
Did you mean:
1ib
2011 Dec 03
1
ActiveRecord Abstract class
...ke 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 not find table ''subclasses''
from
/usr/lib/ruby/gems/1.8/gems/activerecord-3.1.3/lib/active_record/connection_adapters/sqlite_adapter.rb:439:in
`table_structure''
from
/usr/lib/ruby/gems/1.8/gems/ac...