模块:Mongoid::Association::Referenced::Syncable::ClassMethods

定义于:
lib/mongoid/association/referenced/syncable.rb

实例方法摘要折叠

实例方法详细信息

# _synced (association) ⇒对象

设置多对多外键同步。

例子:

设置同步。

Person._synced(association)

参数:



99
100
101
102
103
104
# File 'lib/mongoid/association/referenced/syncable.rb', line 99

def _synced(关联)
  return if 关联.forced_nil_inverse?

  synced_save(关联)
  synced_destroy(关联)
end