File size: 506 Bytes
f5071ca |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
@users.each do |user|
json.set! user.id do
json.extract! user, :email, :id, :fname, :lname, :birthday, :sex,:bio
json.profile_image_url asset_path(user.profile_image_url.url)
json.cover_image_url asset_path(user.cover_image_url.url)
json.friends do
json.array! user.accepted_friends_ids
end
json.friend_requests do
json.array! user.incoming_pending_friends_ids
end
json.friend_requested do
json.array! user.outgoing_pending_friends_ids
end
end
end
|