lib/mongomodel/concerns/document_parent.rb in mongomodel-0.2.9 vs lib/mongomodel/concerns/document_parent.rb in mongomodel-0.2.10
- old
+ new
@@ -1,10 +1,10 @@
module MongoModel
module DocumentParent
extend ActiveSupport::Concern
def parent_document
- if @_parent_document.respond_to?(:call)
+ if @_parent_document.is_a?(Proc)
case @_parent_document.arity
when 0 then @_parent_document.call
else @_parent_document.call(self)
end
else