search for: friends_hash

Displaying 1 result from an estimated 1 matches for "friends_hash".

2008 May 06
1
check_friendship method only returning value of last pair
...f [[friend1ID,memberID],[friend2ID,memberID]...] @friends_array = @current_user.friends.map {|friend| [friend.id, at member.id]} #submit that array to check_friendship and store the resultant hash, which should have format {[friend1ID,memberID]=>true,[friend2ID,memberID]=>false} @friends_hash = facebook_session.check_friendship(@friends_array) # for each value in the returned hash, store the friendID if value is true @friends_hash.each {|key,value| @mutual_friends << key[0] if value} end Looking at check_friendship method, the hash returned should have the same size as...