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

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

实例方法摘要折叠

实例方法详细信息

# _synced (association) ⇒对象

设置多对多外键同步。

例子:

设置同步。

Person._synced(association)

参数:



103
104
105
106
107
108
# File 'lib/mongoid/association/referenced/syncable.rb', line 103

def _synced(关联)
  除非 关联.forced_nil_inverse?
    synced_save(关联)
    synced_destroy(关联)
  end
end