app/models/device.rb
# Sets Device.current to `self` and returns it to the previous value when
#  finished running block. Usually this is unnecessary, but may be required in
# background jobs. If you are not receiving auto_sync data on your client,
# you probably need to use this method.
Sets Device.current to `self` and returns it to the previous value when
finished running block. Usually this is unnecessary, but may be required in
background jobs. If you are not receiving auto_sync data on your client,
you probably need to use this method.
Sets Device . current to ` self ` and returns it to the previous value when finished running block . Usually this is unnecessary but may be required in background jobs . If you are not receiving auto_sync data on your client you probably need to use this method .
def auto_sync_transaction
    Device.current = self
    yield
  ensure
    Device.current = nil
  end
def auto_sync_transaction Device . current = self yield ensure Device . current = nil end
Sets Device.current to `self` and returns it to the previous value when
finished running block.
Sets Device . current to ` self ` and returns it to the previous value when finished running block .