Forget about postgres for now, depend on On duplicate key update

This commit is contained in:
Raphael Sofaer 2011-08-03 14:39:38 -07:00
parent a8104da482
commit 4d786d687c

View file

@ -42,7 +42,6 @@ class Services::Facebook < Service
url = "https://graph.facebook.com/me/friends?fields[]=name&fields[]=picture&access_token=#{URI.escape(self.access_token)}"
response = Faraday.get(url)
data = JSON.parse(response.body)['data']
ServiceUser.where(:service_id => self.id).delete_all
s_users = data.map{ |p|
ServiceUser.new(:service_id => self.id, :uid => p["id"], :photo_url => p["picture"], :name => p["name"])
}