Class: ActsAsPushable::GCM::Notification

Inherits:
Notification show all
Defined in:
lib/acts_as_pushable/gcm/notification.rb

Instance Method Summary collapse

Methods inherited from Notification

#initialize, send

Constructor Details

This class inherits a constructor from ActsAsPushable::Notification

Instance Method Details

#performObject



6
7
8
9
10
11
12
# File 'lib/acts_as_pushable/gcm/notification.rb', line 6

def perform
  response = client.send([device.token], gcm_options)
  if response[:not_registered_ids].include? device.token
    device.update_attribute 'invalidated_at', Time.current
  end
  response
end