Skip to content

Instantly share code, notes, and snippets.

@cheald
Created Feb 5, 2014
Embed
What would you like to do?
module MongoMapper
module Plugins
module Sci
module ClassMethods
def inherited(subclass)
super
if @collection_name == subclass.instance_variable_get("@collection_name")
key :_type, String unless key?(:_type)
subclass.single_collection_parent = self
subclass.instance_variable_set("@single_collection_inherited", true)
end
end
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment