Hi,
I’m really not sure someone will be able to help me, but I have a
problem with apn_on_rails.
When I follow the exemple on the github page I have an error:
device = APN::Device.create(:token => “XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX”)
notification = APN::Notification.new
notification.device = device
notification.badge = 5
notification.sound = true
notification.alert = “foobar”
notification.save
My error:
activeRecord::StatementInvalid: Mysql::Error: Column ‘device_id’ cannot
be null: INSERT INTO apn_notifications
(custom_properties
,
created_at
, device_language
, updated_at
, device_id
, sent_at
,
badge
, errors_nb
, sound
, alert
) VALUES(NULL, ‘2010-07-11
11:22:36’, NULL, ‘2010-07-11 11:22:36’, NULL, NULL, 5, 0, 1, ‘foobar’)
My question is where to I set the device_id ?
I can’t do: device.device_id = XXXXXXXX
Greg