class Foo include Mongoid::Document end class Bar < Foo end
Foo.all returns Bars, and Bar.all returns Foos.
I want to put Foo and Bar in separate collections.
I tried
class Bar < Foo store_in collection: 'bars'
but got
Mongoid::Errors::InvalidStorageParent: Problem: Invalid store_in call on class Bar. Summary: The :store_in macro can only be called on a base Mongoid Document
Using Mongoid 4.0.2
source share