lib/mongoid/relations/builder.rb in mongoid-2.1.0 vs lib/mongoid/relations/builder.rb in mongoid-2.1.1
- old
+ new
@@ -35,10 +35,10 @@
#
# @since 2.0.0.rc.1
def query?
return true unless object.respond_to?(:to_a)
obj = object.to_a.first
- !obj.respond_to?(:attributes) && !obj.nil?
+ !obj.is_a?(Mongoid::Document) && !obj.nil?
end
end
end
end