lib/mongoid/factory.rb in mongoid-5.4.1 vs lib/mongoid/factory.rb in mongoid-6.0.0.beta

- old
+ new

@@ -12,9 +12,10 @@ # @example Build the document. # Mongoid::Factory.build(Person, { "name" => "Durran" }) # # @param [ Class ] klass The class to instantiate from if _type is not present. # @param [ Hash ] attributes The document attributes. + # @param [ Hash ] options The mass assignment scoping options. # # @return [ Document ] The instantiated document. def build(klass, attributes = nil) type = (attributes || {})[TYPE] if type && klass._types.include?(type)