Skip to content

Instantly share code, notes, and snippets.

@kennym
Last active January 22, 2016 17:57
Show Gist options
  • Save kennym/706d65909c759778f9a9 to your computer and use it in GitHub Desktop.
Save kennym/706d65909c759778f9a9 to your computer and use it in GitHub Desktop.
user.favorites.each do |favorite_user|
follows << { source: "flat:#{user.id}", target: "user:#{favorite_user.id}" }
end
user.followers.each do |follower|
followers << { source: "user:#{follower.id}", target: "flat:#{user.id}" }
end
[Skip]
STREAM_CLIENT.follow_many(follows)
STREAM_CLIENT.follow_many(followers)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment