Displaying 1 result from an estimated 1 matches for "push_message_to_all".
2011 May 11
3
Constructing an array of stuff (to send multiple apple push notifications)
...age to them all...it''s something like this
but it''s clearly not quite right... can''t get the :aps => thing to work
out.
I think I need something like this on my Device model, but it''s not
right - please help correct it, would greatly appreciate.
def self.push_message_to_all(message)
devices = self.all
notifications = []
devices.each do |device|
notifications << [device.device_token,message]
end
APNS.send_notifications(notifications)
end
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscr...