Permalink
Browse files

Fixes a bug that would try to look up the machinist sham name for

non-model objects, resulting in the error "No sham defined for name (RuntimeError)"
  • Loading branch information...
kinkade authored and mathieujobin committed Nov 6, 2015
1 parent 7bef802 commit ad778312bf4d31c1cd58d74cc41018de217747a0
Showing with 1 addition and 1 deletion.
  1. +1 −1 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

0 comments on commit ad77831

Please sign in to comment.