I have problems when a model inherits from another ActiveRecord model:
class Space < ActiveRecord::Base
class Project < Space
This only happens in development environment. Not in production, neither
testing. And never in the first request after a server restart, always
the second request.
So I belive it has to do with something related with class reloading.
It seems like after the reloading, the “Space” part of the Project class
missing, like in this error (container_posts is a method of Space):
NoMethodError (undefined method
container_posts' for #<Project:0xb4a533cc>): /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/attribute_methods.rb:256:inmethod_missing’
I get other errors related with “stack level too deep”, but I can’t