diff --git a/lib/pickle/adapters/mongoid.rb b/lib/pickle/adapters/mongoid.rb index 6132e2ba..8c59189e 100644 --- a/lib/pickle/adapters/mongoid.rb +++ b/lib/pickle/adapters/mongoid.rb @@ -13,7 +13,7 @@ def self.except_classes # Gets a list of the available models for this adapter def self.model_classes ObjectSpace.each_object(Class).to_a.select do |klass| - klass.name && klass.ancestors.include?(Mongoid::Document) + klass.ancestors.include?(Mongoid::Document) && klass.name end end