lib/mongoid/association/embedded/embedded_in/proxy.rb in mongoid-8.0.1 vs lib/mongoid/association/embedded/embedded_in/proxy.rb in mongoid-8.0.2
- old
+ new
@@ -30,11 +30,11 @@
# @example Substitute the new document.
# person.name.substitute(new_name)
#
# @param [ Document ] replacement A document to replace the target.
#
- # @return [ Document, nil ] The association or nil.
+ # @return [ Document | nil ] The association or nil.
def substitute(replacement)
unbind_one
unless replacement
_base.delete if persistable?
return nil
@@ -72,10 +72,10 @@
# Are we able to persist this association?
#
# @example Can we persist the association?
# relation.persistable?
#
- # @return [ true, false ] If the association is persistable.
+ # @return [ true | false ] If the association is persistable.
def persistable?
_target.persisted? && !_binding? && !_building?
end
class << self