lib/mongoid/association/referenced/syncable.rb
# Update the inverse keys on destroy.
#
# @example Update the inverse keys.
#   document.remove_inverse_keys(association)
#
# @param [ Association ] association The association.
#
# @return [ Object ] The updated values.
Update the inverse keys on destroy.
Update the inverse keys on destroy .
def remove_inverse_keys(association)
          foreign_keys = send(association.foreign_key)
          unless foreign_keys.nil? || foreign_keys.empty?
            association.criteria(self, foreign_keys).pull(association.inverse_foreign_key => _id)
          end
        end
def remove_inverse_keys ( association ) foreign_keys = send ( association . foreign_key ) unless foreign_keys . nil? || foreign_keys . empty? association . criteria ( self , foreign_keys ) . pull ( association . inverse_foreign_key => _id ) end end
Update the inverse keys on destroy.
Update the inverse keys on destroy .
The updated values.
The updated values .
 Object 
association
<not_specific>
<not_specific>
association The association.
association The association .
example
Update the inverse keys. document.remove_inverse_keys(association)
Update the inverse keys . document . remove_inverse_keys ( association )