lib/mongoid/association/referenced/has_many.rb in mongoid-8.0.1 vs lib/mongoid/association/referenced/has_many.rb in mongoid-8.0.2

- old
+ new

@@ -116,11 +116,11 @@ # The type of this association if it's polymorphic. # # @note Only relevant for polymorphic associations. # - # @return [ String, nil ] The type field. + # @return [ String | nil ] The type field. def type @type ||= "#{as}_type" if polymorphic? end # Add polymorphic query criteria to a Criteria object, if this association is @@ -138,20 +138,20 @@ end end # Is this association polymorphic? # - # @return [ true, false ] Whether this association is polymorphic. + # @return [ true | false ] Whether this association is polymorphic. def polymorphic? @polymorphic ||= !!as end # Whether trying to bind an object using this association should raise # an error. # # @param [ Document ] doc The document to be bound. # - # @return [ true, false ] Whether the document can be bound. + # @return [ true | false ] Whether the document can be bound. def bindable?(doc) forced_nil_inverse? || (!!inverse && doc.fields.keys.include?(foreign_key)) end # The nested builder object.