Class: HyperMesh::LocalSync
Class Method Summary collapse
Class Method Details
.after_save(record, data = {}) ⇒ Object
189 190 191 192 193 194 |
# File 'lib/synchromesh/client_drivers.rb', line 189 def self.after_save(record, data = {}) operation = record.new? ? :create : (record.destroyed? ? :destroy : :change) dummy_broadcast = IncomingBroadcast.new.local(operation, record, data) record.backing_record.sync! data unless operation == :destroy ReactiveRecord::Collection.sync_scopes dummy_broadcast end |