mongoid 版本:mongoid (2.4.12) rails -v #=>Rails 3.1.10
class A
include Mongoid::Document
field :foo
def self.inherited(klass)
end
end
class B < A
field :bar
end
class C < A
end
#C.new
# => #<C _id: 514c9505e3e50a856b000001, _type: "C", foo: nil, bar: nil>