class Gcm::Device

Represents an Android phone. An Gcm::Device can have many Gcm::Notification.

In order for the Gcm::Feedback system to work properly you MUST touch the last_registered_at column every time someone opens your application. If you do not, then it is possible, and probably likely, that their device will be removed and will no longer receive notifications.

Example:

Device.create(:registration_id => 'FOOBAR')

Attributes

feedback_at[RW]

The feedback_at accessor is set when the device is marked as potentially disconnected from your application by Google.

Private Instance Methods

set_last_registered_at() click to toggle source
# File lib/gcm_on_rails/app/models/gcm/device.rb, line 28
def set_last_registered_at
  self.last_registered_at = Time.now if self.last_registered_at.nil?
end