Method: ArSync.with_compact_notification

Defined in:
lib/ar_sync/core.rb

.with_compact_notificationObject



16
17
18
19
20
21
22
23
24
# File 'lib/ar_sync/core.rb', line 16

def self.with_compact_notification
  key = :ar_sync_compact_notifications
  Thread.current[key] = []
  yield
ensure
  events = Thread.current[key]
  Thread.current[key] = nil
  @sync_send_block&.call events if events.present?
end