friends attribute for User ( friends:array_of_Users )
pending_request model -> gets created when you send a friend request. It needs two user attributes sender and reciever.
when a user sends a request we can create a pending_request. (sender: current_user, receiver: target)
on (manage) friends page load have logic to show pending_requests (sender.name wants be a friend y/n)
if yes: add current_user to sender.friends && add sender to current_user.friends
if no: destroy pending_request instance.
Note on views:
friend list will have to show three options: send request, pending, friends!
users/show will have to be updated to only allow showing a friend's page
We will need:
friends attribute for User ( friends:array_of_Users ) pending_request model -> gets created when you send a friend request. It needs two user attributes sender and reciever.
Note on views: