Module: Mongoid::Relations::Synchronization::ClassMethods

Defined in:
lib/mongoid/relations/synchronization.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#synced(metadata) ⇒ Object

Set up the syncing of many to many foreign keys.

Examples:

Set up the syncing.

Person.synced()

Parameters:

  • metadata (Metadata)

    The relation metadata.

Since:

  • 2.1.0



95
96
97
98
99
100
# File 'lib/mongoid/relations/synchronization.rb', line 95

def synced()
  unless .forced_nil_inverse?
    synced_save()
    synced_destroy()
  end
end