mftaff / to-do-countdown

Powerful To-Do web-app. Features multiple task lists, friends, and expiring tasks.
0 stars 0 forks source link

create bi directional confirmable friend system #18

Closed mftaff closed 7 years ago

mftaff commented 7 years ago

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.

  1. when a user sends a request we can create a pending_request. (sender: current_user, receiver: target)
  2. on (manage) friends page load have logic to show pending_requests (sender.name wants be a friend y/n)
  3. if yes: add current_user to sender.friends && add sender to current_user.friends
  4. if no: destroy pending_request instance.

Note on views:

mftaff commented 7 years ago

I ended up using this gem.

The friendship model now works!