Module: Mongoid::Association::Referenced::Syncable::ClassMethods

Defined in:
build/mongoid-master/lib/mongoid/association/referenced/syncable.rb

Instance Method Summary collapse

Instance Method Details

#_synced(association) ⇒ Object

Set up the syncing of many to many foreign keys.

Examples:

Set up the syncing.

Person._synced(association)

Parameters:

  • association (Association)

    The association metadata.

Since:

  • 2.1.0



115
116
117
118
119
120
# File 'build/mongoid-master/lib/mongoid/association/referenced/syncable.rb', line 115

def _synced(association)
  unless association.forced_nil_inverse?
    synced_save(association)
    synced_destroy(association)
  end
end