Skip to content

Instantly share code, notes, and snippets.

@kevin-cantwell
Created October 18, 2014 16:01
Show Gist options
  • Save kevin-cantwell/1bf56f9789d591ac6972 to your computer and use it in GitHub Desktop.
Save kevin-cantwell/1bf56f9789d591ac6972 to your computer and use it in GitHub Desktop.
Push to Benny & Laura's friends
four_pm = Time.parse('2014-10-18 20:00:00 +0000') # 4pm
benny = User.find(1)
laura = User.find(26)
friends << benny
friends << laura
friends += benny.friends_on_timehop;0
friends += laura.friends_on_timehop;0
friends.map do |friend|
notif = PushNotification.new(friend, PushReference.new(:blank_ref, :blank_id))
notif.send_push_at!(four_pm, PushMessage.new("Congratulations to Benny and Laura on their big day! Timehop is very proud of them both!"))
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment